mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-06 03:40:44 +00:00
Moved code concerning INSTALL_AS_USER and INSTALL_AS_GROUP from
common.make to rules.make so that they can be defined in GNUmakefile.premable git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@11731 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2e7368f04d
commit
ccd9a1f372
2 changed files with 50 additions and 50 deletions
50
common.make
50
common.make
|
@ -533,56 +533,6 @@ ifeq ($(JAVADOC),)
|
||||||
JAVADOC = $(JAVA_HOME)/bin/javadoc
|
JAVADOC = $(JAVA_HOME)/bin/javadoc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
|
||||||
# Prepare the arguments to install to set user/group of installed files
|
|
||||||
#
|
|
||||||
INSTALL_AS =
|
|
||||||
|
|
||||||
ifneq ($(INSTALL_AS_USER),)
|
|
||||||
INSTALL_AS += -o $(INSTALL_AS_USER)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(INSTALL_AS_GROUP),)
|
|
||||||
INSTALL_AS += -g $(INSTALL_AS_GROUP)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Redefine INSTALL to include these flags. This automatically
|
|
||||||
# redefines INSTALL_DATA and INSTALL_PROGRAM as well, because they are
|
|
||||||
# define in terms of INSTALL.
|
|
||||||
INSTALL += $(INSTALL_AS)
|
|
||||||
|
|
||||||
# Sometimes, we install without using INSTALL - typically using tar.
|
|
||||||
# In those cases, we run chown after having installed, in order to
|
|
||||||
# fixup the user/group.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Prepare the arguments to chown to set user/group of installed files.
|
|
||||||
#
|
|
||||||
ifneq ($(INSTALL_AS_GROUP),)
|
|
||||||
CHOWN_TO = $(strip $(INSTALL_AS_USER)).$(strip $(INSTALL_AS_GROUP))
|
|
||||||
else
|
|
||||||
CHOWN_TO = $(strip $(INSTALL_AS_USER))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# You need to run CHOWN manually, but only if CHOWN_TO is non-empty.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Pass the CHOWN_TO argument to MKINSTALLDIRS
|
|
||||||
# All installation directories should be created using MKINSTALLDIRS
|
|
||||||
# to make sure we set the correct user/group. Local directories should
|
|
||||||
# be created using MKDIRS instead because we don't want to set user/group.
|
|
||||||
#
|
|
||||||
ifneq ($(CHOWN_TO),)
|
|
||||||
MKINSTALLDIRS = $(MKDIRS) -c $(CHOWN_TO)
|
|
||||||
# Fixup the library installation commands if needed so that we change
|
|
||||||
# ownership of the links as well
|
|
||||||
ifeq ($(shared),yes)
|
|
||||||
AFTER_INSTALL_LIBRARY_CMD += ; $(AFTER_INSTALL_SHARED_LIB_CHOWN)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
MKINSTALLDIRS = $(MKDIRS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
endif # COMMON_MAKE_LOADED
|
endif # COMMON_MAKE_LOADED
|
||||||
|
|
||||||
## Local variables:
|
## Local variables:
|
||||||
|
|
50
rules.make
50
rules.make
|
@ -185,6 +185,56 @@ $(GNUSTEP_MAKEFILES)/$(GNUSTEP_TARGET_DIR)/config.make: ;
|
||||||
|
|
||||||
$(GNUSTEP_MAKEFILES)/Additional/*.make: ;
|
$(GNUSTEP_MAKEFILES)/Additional/*.make: ;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prepare the arguments to install to set user/group of installed files
|
||||||
|
#
|
||||||
|
INSTALL_AS =
|
||||||
|
|
||||||
|
ifneq ($(INSTALL_AS_USER),)
|
||||||
|
INSTALL_AS += -o $(INSTALL_AS_USER)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(INSTALL_AS_GROUP),)
|
||||||
|
INSTALL_AS += -g $(INSTALL_AS_GROUP)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Redefine INSTALL to include these flags. This automatically
|
||||||
|
# redefines INSTALL_DATA and INSTALL_PROGRAM as well, because they are
|
||||||
|
# define in terms of INSTALL.
|
||||||
|
INSTALL += $(INSTALL_AS)
|
||||||
|
|
||||||
|
# Sometimes, we install without using INSTALL - typically using tar.
|
||||||
|
# In those cases, we run chown after having installed, in order to
|
||||||
|
# fixup the user/group.
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prepare the arguments to chown to set user/group of installed files.
|
||||||
|
#
|
||||||
|
ifneq ($(INSTALL_AS_GROUP),)
|
||||||
|
CHOWN_TO = $(strip $(INSTALL_AS_USER)).$(strip $(INSTALL_AS_GROUP))
|
||||||
|
else
|
||||||
|
CHOWN_TO = $(strip $(INSTALL_AS_USER))
|
||||||
|
endif
|
||||||
|
|
||||||
|
# You need to run CHOWN manually, but only if CHOWN_TO is non-empty.
|
||||||
|
|
||||||
|
#
|
||||||
|
# Pass the CHOWN_TO argument to MKINSTALLDIRS
|
||||||
|
# All installation directories should be created using MKINSTALLDIRS
|
||||||
|
# to make sure we set the correct user/group. Local directories should
|
||||||
|
# be created using MKDIRS instead because we don't want to set user/group.
|
||||||
|
#
|
||||||
|
ifneq ($(CHOWN_TO),)
|
||||||
|
MKINSTALLDIRS = $(MKDIRS) -c $(CHOWN_TO)
|
||||||
|
# Fixup the library installation commands if needed so that we change
|
||||||
|
# ownership of the links as well
|
||||||
|
ifeq ($(shared),yes)
|
||||||
|
AFTER_INSTALL_LIBRARY_CMD += ; $(AFTER_INSTALL_SHARED_LIB_CHOWN)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
MKINSTALLDIRS = $(MKDIRS)
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# If this is part of the compilation of a framework,
|
# If this is part of the compilation of a framework,
|
||||||
# add -I[../../../etc]derived_src so that the code can include
|
# add -I[../../../etc]derived_src so that the code can include
|
||||||
|
|
Loading…
Reference in a new issue