Skip to content

Commit

Permalink
Make sure we always install with the correct user/group as specified
Browse files Browse the repository at this point in the history
by INSTALL_AS_USER and INSTALL_AS_GROUP


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@11718 72102866-910b-0410-8b05-ffd578937521
  • Loading branch information
Nicola Pero committed Dec 12, 2001
1 parent b8b911d commit 7d4c6aa
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 32 deletions.
4 changes: 4 additions & 0 deletions Documentation/makedoc.make
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ internal-doc-install::
rm -rf $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
$(TAR) cf - $(INTERNAL_doc_NAME) | \
(cd $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
endif

internal-doc-uninstall::
-rm -f $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
Expand Down
6 changes: 5 additions & 1 deletion application.make
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,13 @@ _FORCE::
internal-app-install:: $(GNUSTEP_APPS)
rm -rf $(GNUSTEP_APPS)/$(APP_DIR_NAME); \
$(TAR) cf - $(APP_DIR_NAME) | (cd $(GNUSTEP_APPS); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(GNUSTEP_APPS)/$(APP_DIR_NAME)
endif


$(GNUSTEP_APPS):
$(MKDIRS) $(GNUSTEP_APPS)
$(MKINSTALLDIRS) $(GNUSTEP_APPS)

internal-app-uninstall::
(cd $(GNUSTEP_APPS); rm -rf $(APP_DIR_NAME))
Expand Down
7 changes: 5 additions & 2 deletions bundle.make
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ $(BUNDLE_DIR_NAME)/Resources/Info-gnustep.plist: $(BUNDLE_DIR_NAME)/Resources

internal-bundle-install:: $(BUNDLE_INSTALL_DIR)
ifneq ($(HEADER_FILES_INSTALL_DIR),)
$(MKDIRS) $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR);
$(MKINSTALLDIRS) $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR);
ifneq ($(HEADER_FILES),)
for file in $(HEADER_FILES) __done; do \
if [ $$file != __done ]; then \
Expand All @@ -304,12 +304,15 @@ endif
if [ ! -d Resources ]; then \
rm -f Resources; $(LN_S) ../Resources .; \
fi;)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(BUNDLE_INSTALL_DIR)/$(BUNDLE_DIR_NAME)
endif

$(BUNDLE_DIR_NAME)/Resources:
$(MKDIRS) $@

$(BUNDLE_INSTALL_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

internal-bundle-uninstall::
ifneq ($(HEADER_FILES),)
Expand Down
8 changes: 4 additions & 4 deletions clibrary.make
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,16 @@ internal-install-dirs:: $(FINAL_LIBRARY_INSTALL_DIR) \
# Now the rule to create each dir. NB: Nothing gets executed if the dir
# already exists
$(FINAL_LIBRARY_INSTALL_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(DLL_INSTALLATION_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(ADDITIONAL_INSTALL_DIRS):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@


internal-install-headers::
Expand Down
4 changes: 2 additions & 2 deletions ctool.make
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ after-$(TARGET)-all::
internal-ctool-install:: $(CTOOL_INSTALLATION_DIR) install-ctool

$(CTOOL_INSTALLATION_DIR):
$(MKDIRS) $(CTOOL_INSTALLATION_DIR)
$(MKINSTALLDIRS) $(CTOOL_INSTALLATION_DIR)

install-ctool::
$(INSTALL_PROGRAM) -m 0755 \
$(GNUSTEP_OBJ_DIR)/$(INTERNAL_ctool_NAME)$(EXEEXT) \
$(CTOOL_INSTALLATION_DIR)
ifeq ($(GNUSTEP_FLATTENED),)
cp $(GNUSTEP_MAKEFILES)/executable.template \
$(INSTALL_DATA) $(GNUSTEP_MAKEFILES)/executable.template \
$(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_ctool_NAME); \
chmod a+x $(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_ctool_NAME)
endif
Expand Down
6 changes: 5 additions & 1 deletion documentation.make
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ endif # JAVADOC_FILES
internal-doc-install:: $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)

$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR):
$(MKDIRS) $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)
$(MKINSTALLDIRS) $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)

#
# texi installation
Expand Down Expand Up @@ -349,6 +349,10 @@ internal-doc-install::
rm -rf $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
$(TAR) cf - $(INTERNAL_doc_NAME) | \
(cd $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) \
$(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
endif

internal-doc-uninstall::
-rm -f $(GNUSTEP_DOCUMENTATION)/$(DOC_INSTALL_DIR)/$(INTERNAL_doc_NAME)
Expand Down
39 changes: 34 additions & 5 deletions framework.make
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,22 @@ internal-framework-install:: $(FRAMEWORK_INSTALL_DIR) \
$(GNUSTEP_FRAMEWORKS_HEADERS)
rm -rf $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)
$(TAR) cf - $(FRAMEWORK_DIR_NAME) | (cd $(FRAMEWORK_INSTALL_DIR); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)
endif
@(cd $(GNUSTEP_FRAMEWORKS_HEADERS); \
if [ "$(HEADER_FILES)" != "" ]; then \
if test -L "$(INTERNAL_framework_NAME)"; then \
rm -f $(INTERNAL_framework_NAME); \
fi; \
$(LN_S) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)/Headers $(INTERNAL_framework_NAME); \
fi;)
ifneq ($(CHOWN_TO),)
@(cd $(GNUSTEP_FRAMEWORKS_HEADERS); \
if [ "$(HEADER_FILES)" != "" ]; then \
$(CHOWN) $(CHOWN_TO) $(INTERNAL_framework_NAME); \
fi;)
endif
@(cd $(GNUSTEP_FRAMEWORKS_LIBRARIES)/$(GNUSTEP_TARGET_LDIR); \
if test -f "$(FRAMEWORK_LIBRARY_FILE)"; then \
rm -f $(FRAMEWORK_LIBRARY_FILE); \
Expand All @@ -467,6 +476,14 @@ internal-framework-install:: $(FRAMEWORK_INSTALL_DIR) \
$(LN_S) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_CURRENT_LIBRARY_DIR_NAME)/$(SONAME_FRAMEWORK_FILE) $(SONAME_FRAMEWORK_FILE); \
fi; \
$(LN_S) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_CURRENT_LIBRARY_DIR_NAME)/$(VERSION_FRAMEWORK_LIBRARY_FILE) $(VERSION_FRAMEWORK_LIBRARY_FILE);)
ifneq ($(CHOWN_TO),)
(cd $(GNUSTEP_FRAMEWORKS_LIBRARIES)/$(GNUSTEP_TARGET_LDIR); \
$(CHOWN) $(CHOWN_TO) $(FRAMEWORK_LIBRARY_FILE); \
if test -f "$(SONAME_FRAMEWORK_FILE)"; then \
$(CHOWN) $(CHOWN_TO) $(SONAME_FRAMEWORK_FILE); \
fi; \
$(CHOWN) $(CHOWN_TO) $(VERSION_FRAMEWORK_LIBRARY_FILE))
endif

else # install DLL

Expand All @@ -476,16 +493,25 @@ internal-framework-install:: $(FRAMEWORK_INSTALL_DIR) \
$(DLL_INSTALLATION_DIR)
rm -rf $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)
$(TAR) cf - $(FRAMEWORK_DIR_NAME) | (cd $(FRAMEWORK_INSTALL_DIR); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_DIR_NAME)
endif
(cd $(GNUSTEP_FRAMEWORKS_HEADERS); \
if [ "$(HEADER_FILES)" != "" ]; then \
if test -d "$(INTERNAL_framework_NAME)"; then \
rm -Rf $(INTERNAL_framework_NAME); \
fi; \
$(MKDIRS) $(INTERNAL_framework_NAME); \
$(MKINSTALLDIRS) $(INTERNAL_framework_NAME); \
cd $(FRAMEWORK_INSTALL_DIR)/$(FRAMEWORK_VERSION_DIR_NAME)/Headers ; \
$(TAR) cf - . | (cd $(GNUSTEP_FRAMEWORKS_HEADERS)/$(INTERNAL_framework_NAME); \
$(TAR) xf - ); \
fi;)
ifneq ($(CHOWN_TO),)
@(cd $(GNUSTEP_FRAMEWORKS_HEADERS); \
if [ "$(HEADER_FILES)" != "" ]; then \
$(CHOWN) -R $(CHOWN_TO) $(INTERNAL_framework_NAME); \
fi;)
endif
(cd $(DLL_INSTALLATION_DIR); \
if test -f "$(FRAMEWORK_FILE)"; then \
rm -f $(FRAMEWORK_FILE); \
Expand All @@ -496,16 +522,19 @@ internal-framework-install:: $(FRAMEWORK_INSTALL_DIR) \
endif

$(DLL_INSTALLATION_DIR)::
$(MKINSTALLDIRS) $@

$(FRAMEWORK_DIR_NAME)/Resources::
$(MKDIRS) $@

$(FRAMEWORK_DIR_NAME)/Resources $(FRAMEWORK_INSTALL_DIR)::
@$(MKDIRS) $@
$(FRAMEWORK_INSTALL_DIR)::
@$(MKINSTALLDIRS) $@

$(GNUSTEP_FRAMEWORKS_LIBRARIES)/$(GNUSTEP_TARGET_LDIR) :
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(GNUSTEP_FRAMEWORKS_HEADERS) :
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

internal-framework-uninstall::
if [ "$(HEADER_FILES)" != "" ]; then \
Expand Down
5 changes: 4 additions & 1 deletion gswapp.make
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,12 @@ $(GSWAPP_DIR_NAME)/WebServerResources:
@$(MKDIRS) $@

internal-gswapp-install::
@($(MKDIRS) $(GNUSTEP_GSWAPPS); \
@($(MKINSTALLDIRS) $(GNUSTEP_GSWAPPS); \
rm -rf $(GNUSTEP_GSWAPPS)/$(GSWAPP_DIR_NAME); \
$(TAR) ch --exclude=CVS --to-stdout $(GSWAPP_DIR_NAME) | (cd $(GNUSTEP_GSWAPPS); $(TAR) xf -))
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(GNUSTEP_GSWAPPS)/$(GSWAPP_DIR_NAME)
endif

internal-gswapp-uninstall::
(cd $(GNUSTEP_GSWAPPS); rm -rf $(GSWAPP_DIR_NAME))
Expand Down
7 changes: 5 additions & 2 deletions gswbundle.make
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ $(GSWBUNDLE_DIR_NAME)/WebServerResources:

internal-bundle-install:: $(GSWBUNDLE_INSTALL_DIR)
ifneq ($(HEADER_FILES_INSTALL_DIR),)
$(MKDIRS) $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR);
$(MKINSTALLDIRS) $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR);
ifneq ($(HEADER_FILES),)
for file in $(HEADER_FILES) __done; do \
if [ $$file != __done ]; then \
Expand All @@ -287,9 +287,12 @@ endif
endif
rm -rf $(GSWBUNDLE_INSTALL_DIR)/$(GSWBUNDLE_DIR_NAME); \
$(TAR) ch --exclude=CVS --to-stdout $(GSWBUNDLE_DIR_NAME) | (cd $(GSWBUNDLE_INSTALL_DIR); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(GSWBUNDLE_INSTALL_DIR)/$(GSWBUNDLE_DIR_NAME)
endif

$(GSWBUNDLE_INSTALL_DIR)::
@$(MKDIRS) $@
@$(MKINSTALLDIRS) $@

internal-bundle-uninstall::
ifneq ($(HEADER_FILES),)
Expand Down
4 changes: 2 additions & 2 deletions java-tool.make
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ after-$(TARGET)-all::
internal-java_tool-install:: install-java_tool

$(JAVA_TOOL_INSTALLATION_DIR):
$(MKDIRS) $(JAVA_TOOL_INSTALLATION_DIR)
$(MKINSTALLDIRS) $(JAVA_TOOL_INSTALLATION_DIR)

internal-install-java_tool-dirs:: $(JAVA_TOOL_INSTALLATION_DIR)
ifneq ($(JAVA_OBJ_FILES),)
$(MKDIRS) $(addprefix $(JAVA_TOOL_INSTALLATION_DIR)/,$(dir $(JAVA_OBJ_FILES)));
$(MKINSTALLDIRS) $(addprefix $(JAVA_TOOL_INSTALLATION_DIR)/,$(dir $(JAVA_OBJ_FILES)));
endif

ifeq ($(PRINCIPAL_CLASS),)
Expand Down
4 changes: 2 additions & 2 deletions java.make
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ internal-java_package-install:: install-java_package

internal-install-java-dirs:: $(JAVA_INSTALLATION_DIR)
ifneq ($(JAVA_OBJ_FILES),)
$(MKDIRS) \
$(MKINSTALLDIRS) \
$(addprefix $(JAVA_INSTALLATION_DIR)/,$(dir $(JAVA_OBJ_FILES)))
endif

$(JAVA_INSTALLATION_DIR):
$(MKDIRS) $(JAVA_INSTALLATION_DIR)
$(MKINSTALLDIRS) $(JAVA_INSTALLATION_DIR)

# Say that you have a Pisa.java source file. Here we install both
# Pisa.class (the main class) and also, if they exist, all class files
Expand Down
8 changes: 4 additions & 4 deletions library.make
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,16 @@ internal-install-dirs:: $(FINAL_LIBRARY_INSTALL_DIR) \
# Now the rule to create each dir. NB: Nothing gets executed if the dir
# already exists
$(FINAL_LIBRARY_INSTALL_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(DLL_INSTALLATION_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(ADDITIONAL_INSTALL_DIRS):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@


internal-install-headers::
Expand Down
2 changes: 1 addition & 1 deletion objc.make
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ internal-objc_program-install:: $(OBJC_PROGRAM_INSTALLATION_DIR) \
install-objc_program

$(OBJC_PROGRAM_INSTALLATION_DIR):
$(MKDIRS) $(OBJC_PROGRAM_INSTALLATION_DIR)
$(MKINSTALLDIRS) $(OBJC_PROGRAM_INSTALLATION_DIR)

install-objc_program::
$(INSTALL_PROGRAM) -m 0755 \
Expand Down
2 changes: 1 addition & 1 deletion palette.make
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ internal-palette-install:: internal-install-dirs
internal-install-dirs:: $(PALETTE_INSTALL_DIR)

$(PALETTE_INSTALL_DIR):
$(MKDIRS) $(PALETTE_INSTALL_DIR)
$(MKINSTALLDIRS) $(PALETTE_INSTALL_DIR)

$(PALETTE_DIR_NAME)/Resources:
$(MKDIRS) $@
Expand Down
5 changes: 4 additions & 1 deletion service.make
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,14 @@ $(SERVICE_DIR_NAME)/Resources:
@$(MKDIRS) $@

$(GNUSTEP_SERVICES):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

internal-service-install:: $(GNUSTEP_SERVICES)
rm -rf $(GNUSTEP_SERVICES)/$(SERVICE_DIR_NAME); \
$(TAR) cf - $(SERVICE_DIR_NAME) | (cd $(GNUSTEP_SERVICES); $(TAR) xf -)
ifneq ($(CHOWN_TO),)
$(CHOWN) -R $(CHOWN_TO) $(GNUSTEP_SERVICES)/$(SERVICE_DIR_NAME)
endif

internal-service-uninstall::
(cd $(GNUSTEP_SERVICES); rm -rf $(SERVICE_DIR_NAME))
Expand Down
4 changes: 2 additions & 2 deletions subproject.make
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ internal-subproject-install:: $(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR) \
internal-install-headers

$(GNUSTEP_HEADERS)/$(HEADER_FILES_INSTALL_DIR):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

$(ADDITIONAL_INSTALL_DIRS):
$(MKDIRS) $@
$(MKINSTALLDIRS) $@

internal-install-headers::
ifneq ($(HEADER_FILES),)
Expand Down
2 changes: 1 addition & 1 deletion tool.make
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ install-tool::
$(TOOL_INSTALLATION_DIR)
ifeq ($(GNUSTEP_FLATTENED),)
ifeq ($(FRAMEWORK_NAME),)
cp $(GNUSTEP_MAKEFILES)/executable.template \
$(INSTALL_DATA) $(GNUSTEP_MAKEFILES)/executable.template \
$(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_tool_NAME); \
chmod a+x $(GNUSTEP_INSTALLATION_DIR)/Tools/$(INTERNAL_tool_NAME);
else
Expand Down

0 comments on commit 7d4c6aa

Please sign in to comment.