patch for AIX system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Find attached a small patch to make git install cleanly on an AIX system

--
_______________________________________________Norbert Nemec
  Lilienstr. 5a ... 12203 Berlin-Lichterfelde ... Germany
      Tel: +49-30-5483 3143 Mobile: +49-176-5502 5643
          eMail:<Norbert@xxxxxxxxxxxxxxx>

>From def4428ad827d1e6550634a2fe1f035c1b148426 Mon Sep 17 00:00:00 2001
From: Norbert Nemec <Norbert@xxxxxxxxxxxxxxx>
Date: Wed, 17 Nov 2010 08:25:44 +0100
Subject: [PATCH] Fix for installation on AIX

The BSD style 'install' command is call 'installbsd' and does not support the -d option.
Therefore '$(INSTALL) -d' is replaced by a new variable '$(INSTALLDIR)' in all Makefiles
which can be changed independently of $(INSTALL).
---
 Documentation/Makefile |   10 +++++-----
 Makefile               |    7 +++++--
 git-gui/Makefile       |    4 ++--
 gitk-git/Makefile      |    2 +-
 gitweb/Makefile        |    4 ++--
 templates/Makefile     |    2 +-
 6 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index e117bc4..c2db8db 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -180,15 +180,15 @@ pdf: user-manual.pdf
 install: install-man
 
 install-man: man
-	$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
-	$(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
-	$(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
+	$(INSTALLDIR) -m 755 $(DESTDIR)$(man1dir)
+	$(INSTALLDIR) -m 755 $(DESTDIR)$(man5dir)
+	$(INSTALLDIR) -m 755 $(DESTDIR)$(man7dir)
 	$(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
 	$(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir)
 	$(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
 
 install-info: info
-	$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)
+	$(INSTALLDIR) -m 755 $(DESTDIR)$(infodir)
 	$(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir)
 	if test -r $(DESTDIR)$(infodir)/dir; then \
 	  $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\
@@ -198,7 +198,7 @@ install-info: info
 	fi
 
 install-pdf: pdf
-	$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
+	$(INSTALLDIR) -m 755 $(DESTDIR)$(pdfdir)
 	$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
 
 install-html: html
diff --git a/Makefile b/Makefile
index 1f1ce04..2664d7c 100644
--- a/Makefile
+++ b/Makefile
@@ -308,6 +308,7 @@ DIFF = diff
 TAR = tar
 FIND = find
 INSTALL = install
+INSTALLDIR = install -d
 RPMBUILD = rpmbuild
 TCL_PATH = tclsh
 TCLTK_PATH = wish
@@ -953,6 +954,8 @@ ifeq ($(uname_S),AIX)
 	NO_MKSTEMPS = YesPlease
 	NO_STRLCPY = YesPlease
 	NO_NSEC = YesPlease
+	INSTALL = installbsd
+	INSTALLDIR = mkdir -p
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	INTERNAL_QSORT = UnfortunatelyYes
 	NEEDS_LIBICONV=YesPlease
@@ -2103,8 +2106,8 @@ export gitexec_instdir
 install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X)
 
 install: all
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+	$(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
+	$(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 	$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
diff --git a/git-gui/Makefile b/git-gui/Makefile
index e22ba5c..b96b3df 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -48,7 +48,7 @@ endif
 RM_RF     ?= rm -rf
 RMDIR     ?= rmdir
 
-INSTALL_D0 = $(INSTALL) -d -m 755 # space is required here
+INSTALL_D0 = $(INSTALLDIR) -m 755 # space is required here
 INSTALL_D1 =
 INSTALL_R0 = $(INSTALL) -m 644 # space is required here
 INSTALL_R1 =
@@ -76,7 +76,7 @@ ifndef V
 	QUIET_2DEVNULL = 2>/dev/null
 
 	INSTALL_D0 = dir=
-	INSTALL_D1 = && echo ' ' DEST $$dir && $(INSTALL) -d -m 755 "$$dir"
+	INSTALL_D1 = && echo ' ' DEST $$dir && $(INSTALLDIR) -m 755 "$$dir"
 	INSTALL_R0 = src=
 	INSTALL_R1 = && echo '   ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
 	INSTALL_X0 = src=
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index e1b6045..b838d87 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -41,7 +41,7 @@ all:: gitk-wish $(ALL_MSGFILES)
 
 install:: all
 	$(INSTALL) -m 755 gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)'
+	$(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)'
 	$(foreach p,$(ALL_MSGFILES), $(INSTALL) -m 644 $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
 
 uninstall::
diff --git a/gitweb/Makefile b/gitweb/Makefile
index e32ee76..3f1ac82 100644
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
@@ -148,9 +148,9 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS
 ### Installation rules
 
 install: all
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)'
+	$(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)'
 	$(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)'
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
+	$(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
 	$(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
 
 ### Cleaning rules
diff --git a/templates/Makefile b/templates/Makefile
index d22a71a..3808b04 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -61,6 +61,6 @@ clean:
 	$(RM) -r blt boilerplates.made
 
 install: all
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
+	$(INSTALLDIR) -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
 	(cd blt && $(TAR) cf - .) | \
 	(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
-- 
1.7.1


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]