c6833e1
From 5a380ce5d1c8d5a1474764a7a54a1e2072fddb03 Mon Sep 17 00:00:00 2001
c6833e1
From: Erick Tryzelaar <idadesub@users.sourceforge.net>
c6833e1
Date: Fri, 21 Aug 2009 11:59:01 -0700
c6833e1
Subject: [PATCH] Rewrite makefiles to explicitly reference DESTDIR so we can not bake DESTDIR
c6833e1
 into the O'Caml symlinks.
c6833e1
MIME-Version: 1.0
c6833e1
Content-Type: multipart/mixed; boundary="------------1.6.4"
c6833e1
c6833e1
This is a multi-part message in MIME format.
c6833e1
--------------1.6.4
c6833e1
Content-Type: text/plain; charset=UTF-8; format=fixed
c6833e1
Content-Transfer-Encoding: 8bit
c6833e1
c6833e1
---
c6833e1
 Makefile.config.in         |   16 +++++++-------
c6833e1
 Makefile.rules             |   46 ++++++++++++++++++++++----------------------
c6833e1
 docs/CommandGuide/Makefile |    6 ++--
c6833e1
 docs/Makefile              |   24 +++++++++++-----------
c6833e1
 docs/tutorial/Makefile     |    2 +-
c6833e1
 lib/VMCore/Makefile        |    4 +-
c6833e1
 tools/gccas/Makefile       |    4 +-
c6833e1
 tools/gccld/Makefile       |    4 +-
c6833e1
 tools/llvm-config/Makefile |    4 +-
c6833e1
 9 files changed, 55 insertions(+), 55 deletions(-)
c6833e1
c6833e1
c6833e1
--------------1.6.4
c6833e1
Content-Type: text/x-patch; name="0001-Rewrite-makefiles-to-explicitly-reference-DESTDIR-so.patch"
c6833e1
Content-Transfer-Encoding: 8bit
c6833e1
Content-Disposition: attachment; filename="0001-Rewrite-makefiles-to-explicitly-reference-DESTDIR-so.patch"
c6833e1
c6833e1
diff --git Makefile.config.in Makefile.config.in
c6833e1
index ecd0595..73656f7 100644
c6833e1
--- Makefile.config.in
c6833e1
+++ Makefile.config.in
c6833e1
@@ -76,14 +76,14 @@ endif
c6833e1
 
c6833e1
 LLVMMAKE := $(LLVM_SRC_ROOT)/make
c6833e1
 
c6833e1
-PROJ_bindir     := $(DESTDIR)$(PROJ_prefix)/bin
c6833e1
-PROJ_libdir     := $(DESTDIR)$(PROJ_prefix)/lib
c6833e1
-PROJ_datadir    := $(DESTDIR)$(PROJ_prefix)/share
c6833e1
-PROJ_docsdir    := $(DESTDIR)$(PROJ_prefix)/docs/llvm
c6833e1
-PROJ_etcdir     := $(DESTDIR)$(PROJ_prefix)/etc/llvm
c6833e1
-PROJ_includedir := $(DESTDIR)$(PROJ_prefix)/include
c6833e1
-PROJ_infodir    := $(DESTDIR)$(PROJ_prefix)/info
c6833e1
-PROJ_mandir     := $(DESTDIR)$(PROJ_prefix)/share/man
c6833e1
+PROJ_bindir     := $(PROJ_prefix)/bin
c6833e1
+PROJ_libdir     := $(PROJ_prefix)/lib
c6833e1
+PROJ_datadir    := $(PROJ_prefix)/share
c6833e1
+PROJ_docsdir    := $(PROJ_prefix)/docs/llvm
c6833e1
+PROJ_etcdir     := $(PROJ_prefix)/etc/llvm
c6833e1
+PROJ_includedir := $(PROJ_prefix)/include
c6833e1
+PROJ_infodir    := $(PROJ_prefix)/info
c6833e1
+PROJ_mandir     := $(PROJ_prefix)/share/man
c6833e1
 
c6833e1
 # Determine if we're on a unix type operating system
c6833e1
 LLVM_ON_UNIX:=@LLVM_ON_UNIX@
c6833e1
diff --git Makefile.rules Makefile.rules
c6833e1
index 5556684..08965f3 100644
c6833e1
--- Makefile.rules
c6833e1
+++ Makefile.rules
c6833e1
@@ -720,7 +720,7 @@ ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc)
c6833e1
 # in the file so they get built before dependencies
c6833e1
 #---------------------------------------------------------
c6833e1
 
c6833e1
-$(PROJ_bindir) $(PROJ_libdir) $(PROJ_includedir) $(PROJ_etcdir)::
c6833e1
+$(DESTDIR)$(PROJ_bindir) $(DESTDIR)$(PROJ_libdir) $(DESTDIR)$(PROJ_includedir) $(DESTDIR)$(PROJ_etcdir)::
c6833e1
 	$(Verb) $(MKDIR) $@
c6833e1
 
c6833e1
 # To create other directories, as needed, and timestamp their creation
c6833e1
@@ -842,22 +842,22 @@ install-local::
c6833e1
 uninstall-local::
c6833e1
 	$(Echo) UnInstall circumvented with NO_INSTALL
c6833e1
 else
c6833e1
-install-local:: $(PROJ_etcdir) $(CONFIG_FILES)
c6833e1
-	$(Echo) Installing Configuration Files To $(PROJ_etcdir)
c6833e1
+install-local:: $(DESTDIR)$(PROJ_etcdir) $(CONFIG_FILES)
c6833e1
+	$(Echo) Installing Configuration Files To $(DESTDIR)$(PROJ_etcdir)
c6833e1
 	$(Verb)for file in $(CONFIG_FILES); do \
c6833e1
           if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
c6833e1
-            $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(PROJ_etcdir) ; \
c6833e1
+            $(DataInstall) $(PROJ_OBJ_DIR)/$${file} $(DESTDIR)$(PROJ_etcdir) ; \
c6833e1
           elif test -f $(PROJ_SRC_DIR)/$${file} ; then \
c6833e1
-            $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(PROJ_etcdir) ; \
c6833e1
+            $(DataInstall) $(PROJ_SRC_DIR)/$${file} $(DESTDIR)$(PROJ_etcdir) ; \
c6833e1
           else \
c6833e1
             $(ECHO) Error: cannot find config file $${file}. ; \
c6833e1
           fi \
c6833e1
 	done
c6833e1
 
c6833e1
 uninstall-local::
c6833e1
-	$(Echo) Uninstalling Configuration Files From $(PROJ_etcdir)
c6833e1
+	$(Echo) Uninstalling Configuration Files From $(DESTDIR)$(PROJ_etcdir)
c6833e1
 	$(Verb)for file in $(CONFIG_FILES); do \
c6833e1
-	  $(RM) -f $(PROJ_etcdir)/$${file} ; \
c6833e1
+	  $(RM) -f $(DESTDIR)$(PROJ_etcdir)/$${file} ; \
c6833e1
 	done
c6833e1
 endif
c6833e1
 
c6833e1
@@ -944,7 +944,7 @@ endif
c6833e1
 ifdef BYTECODE_DESTINATION
c6833e1
 ModuleDestDir := $(BYTECODE_DESTINATION)
c6833e1
 else
c6833e1
-ModuleDestDir := $(PROJ_libdir)
c6833e1
+ModuleDestDir := $(DESTDIR)$(PROJ_libdir)
c6833e1
 endif
c6833e1
 
c6833e1
 ifdef NO_INSTALL
c6833e1
@@ -1023,17 +1023,17 @@ install-local::
c6833e1
 uninstall-local::
c6833e1
 	$(Echo) Uninstall circumvented with NO_INSTALL
c6833e1
 else
c6833e1
-DestSharedLib = $(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
c6833e1
+DestSharedLib = $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME)$(SHLIBEXT)
c6833e1
 
c6833e1
 install-local:: $(DestSharedLib)
c6833e1
 
c6833e1
-$(DestSharedLib): $(LibName.SO) $(PROJ_libdir)
c6833e1
+$(DestSharedLib): $(LibName.SO) $(DESTDIR)$(PROJ_libdir)
c6833e1
 	$(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib)
c6833e1
 	$(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib)
c6833e1
 
c6833e1
 uninstall-local::
c6833e1
 	$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
c6833e1
-	-$(Verb) $(RM) -f $(PROJ_libdir)/lib$(LIBRARYNAME).*
c6833e1
+	-$(Verb) $(RM) -f $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).*
c6833e1
 endif
c6833e1
 endif
c6833e1
 
c6833e1
@@ -1078,7 +1078,7 @@ endif
c6833e1
 ifdef BYTECODE_DESTINATION
c6833e1
 BytecodeDestDir := $(BYTECODE_DESTINATION)
c6833e1
 else
c6833e1
-BytecodeDestDir := $(PROJ_libdir)
c6833e1
+BytecodeDestDir := $(DESTDIR)$(PROJ_libdir)
c6833e1
 endif
c6833e1
 
c6833e1
 DestBytecodeLib = $(BytecodeDestDir)/lib$(LIBRARYNAME).bca
c6833e1
@@ -1141,13 +1141,13 @@ install-local::
c6833e1
 uninstall-local::
c6833e1
 	$(Echo) Uninstall circumvented with NO_INSTALL
c6833e1
 else
c6833e1
-DestArchiveLib := $(PROJ_libdir)/lib$(LIBRARYNAME).a
c6833e1
+DestArchiveLib := $(DESTDIR)$(PROJ_libdir)/lib$(LIBRARYNAME).a
c6833e1
 
c6833e1
 install-local:: $(DestArchiveLib)
c6833e1
 
c6833e1
-$(DestArchiveLib): $(LibName.A) $(PROJ_libdir)
c6833e1
+$(DestArchiveLib): $(LibName.A) $(DESTDIR)$(PROJ_libdir)
c6833e1
 	$(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_libdir)
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_libdir)
c6833e1
 	$(Verb) $(INSTALL) $(LibName.A) $(DestArchiveLib)
c6833e1
 
c6833e1
 uninstall-local::
c6833e1
@@ -1225,11 +1225,11 @@ install-local::
c6833e1
 uninstall-local::
c6833e1
 	$(Echo) Uninstall circumvented with NO_INSTALL
c6833e1
 else
c6833e1
-DestTool = $(PROJ_bindir)/$(TOOLNAME)$(EXEEXT)
c6833e1
+DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLNAME)$(EXEEXT)
c6833e1
 
c6833e1
 install-local:: $(DestTool)
c6833e1
 
c6833e1
-$(DestTool): $(ToolBuildPath) $(PROJ_bindir)
c6833e1
+$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir)
c6833e1
 	$(Echo) Installing $(BuildMode) $(DestTool)
c6833e1
 	$(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool)
c6833e1
 
c6833e1
@@ -1824,25 +1824,25 @@ uninstall-local::
c6833e1
 else
c6833e1
 install-local::
c6833e1
 	$(Echo) Installing include files
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_includedir)
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
c6833e1
 	$(Verb) if test -d "$(PROJ_SRC_ROOT)/include" ; then \
c6833e1
 	  cd $(PROJ_SRC_ROOT)/include && \
c6833e1
 	  for  hdr in `find . -type f '!' '(' -name '*~' \
c6833e1
 	      -o -name '.#*' -o -name '*.in' ')' -print | grep -v CVS | \
c6833e1
 	      grep -v .svn` ; do \
c6833e1
-	    instdir=`dirname "$(PROJ_includedir)/$$hdr"` ; \
c6833e1
+	    instdir=`dirname "$(DESTDIR)$(PROJ_includedir)/$$hdr"` ; \
c6833e1
 	    if test \! -d "$$instdir" ; then \
c6833e1
 	      $(EchoCmd) Making install directory $$instdir ; \
c6833e1
 	      $(MKDIR) $$instdir ;\
c6833e1
 	    fi ; \
c6833e1
-	    $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
c6833e1
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
c6833e1
 	  done ; \
c6833e1
 	fi
c6833e1
 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
c6833e1
 	$(Verb) if test -d "$(PROJ_OBJ_ROOT)/include" ; then \
c6833e1
 	  cd $(PROJ_OBJ_ROOT)/include && \
c6833e1
 	  for hdr in `find . -type f -print | grep -v CVS` ; do \
c6833e1
-	    $(DataInstall) $$hdr $(PROJ_includedir)/$$hdr ; \
c6833e1
+	    $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
c6833e1
 	  done ; \
c6833e1
 	fi
c6833e1
 endif
c6833e1
@@ -1854,10 +1854,10 @@ uninstall-local::
c6833e1
 	    $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \
c6833e1
 	      '!' '(' -name '*~' -o -name '.#*' \
c6833e1
         -o -name '*.in' ')' -print ')' | \
c6833e1
-        grep -v CVS | sed 's#^#$(PROJ_includedir)/#'` ; \
c6833e1
+        grep -v CVS | sed 's#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \
c6833e1
 	  cd $(PROJ_SRC_ROOT)/include && \
c6833e1
 	    $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f -name '*.in' \
c6833e1
-      -print ')' | sed 's#\.in$$##;s#^#$(PROJ_includedir)/#'` ; \
c6833e1
+      -print ')' | sed 's#\.in$$##;s#^#$(DESTDIR)$(PROJ_includedir)/#'` ; \
c6833e1
 	fi
c6833e1
 endif
c6833e1
 endif
c6833e1
diff --git docs/CommandGuide/Makefile docs/CommandGuide/Makefile
c6833e1
index cf77e6a..28835ac 100644
c6833e1
--- docs/CommandGuide/Makefile
c6833e1
+++ docs/CommandGuide/Makefile
c6833e1
@@ -71,9 +71,9 @@ EXTRA_DIST := $(POD) index.html
c6833e1
 clean-local::
c6833e1
 	$(Verb) $(RM) -f pod2htm*.*~~ $(HTML) $(MAN) $(PS)
c6833e1
 
c6833e1
-HTML_DIR := $(PROJ_docsdir)/html/CommandGuide
c6833e1
-MAN_DIR  := $(PROJ_mandir)/man1
c6833e1
-PS_DIR   := $(PROJ_docsdir)/ps
c6833e1
+HTML_DIR := $(DESTDIR)$(PROJ_docsdir)/html/CommandGuide
c6833e1
+MAN_DIR  := $(DESTDIR)$(PROJ_mandir)/man1
c6833e1
+PS_DIR   := $(DESTDIR)$(PROJ_docsdir)/ps
c6833e1
 
c6833e1
 install-local:: $(HTML) $(MAN) $(PS)
c6833e1
 	$(Echo) Installing HTML CommandGuide Documentation
c6833e1
diff --git docs/Makefile docs/Makefile
c6833e1
index 310c4bd..30cd8a7 100644
c6833e1
--- docs/Makefile
c6833e1
+++ docs/Makefile
c6833e1
@@ -48,11 +48,11 @@ generated:: doxygen ocamldoc
c6833e1
 
c6833e1
 install-html: $(PROJ_OBJ_DIR)/html.tar.gz
c6833e1
 	$(Echo) Installing HTML documentation
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_docsdir)/html
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_docsdir)/html/img
c6833e1
-	$(Verb) $(DataInstall) $(HTML) $(PROJ_docsdir)/html
c6833e1
-	$(Verb) $(DataInstall) $(IMAGES) $(PROJ_docsdir)/html/img
c6833e1
-	$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(PROJ_docsdir)
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img
c6833e1
+	$(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html
c6833e1
+	$(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img
c6833e1
+	$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir)
c6833e1
 
c6833e1
 $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
c6833e1
 	$(Echo) Packaging HTML documentation
c6833e1
@@ -63,11 +63,11 @@ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
c6833e1
 
c6833e1
 install-doxygen: doxygen
c6833e1
 	$(Echo) Installing doxygen documentation
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_docsdir)/html/doxygen
c6833e1
-	$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_docsdir)
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen
c6833e1
+	$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir)
c6833e1
 	$(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
c6833e1
 	  $(FIND) . -type f -exec \
c6833e1
-	    $(DataInstall) {} $(PROJ_docsdir)/html/doxygen \;
c6833e1
+	    $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \;
c6833e1
 
c6833e1
 doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
c6833e1
 
c6833e1
@@ -94,11 +94,11 @@ $(LLVM_SRC_ROOT)/docs/userloc.html:
c6833e1
 
c6833e1
 install-ocamldoc: ocamldoc
c6833e1
 	$(Echo) Installing ocamldoc documentation
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_docsdir)/ocamldoc/html
c6833e1
-	$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_docsdir)
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html
c6833e1
+	$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(DESTDIR)$(PROJ_docsdir)
c6833e1
 	$(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \
c6833e1
 	  $(FIND) . -type f -exec \
c6833e1
-	    $(DataInstall) {} $(PROJ_docsdir)/ocamldoc/html \;
c6833e1
+	    $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/ocamldoc/html \;
c6833e1
 
c6833e1
 ocamldoc: regen-ocamldoc $(PROJ_OBJ_DIR)/ocamldoc.tar.gz
c6833e1
 
c6833e1
@@ -122,4 +122,4 @@ $(PROJ_OBJ_DIR)/ocamldoc.tar.gz:
c6833e1
 
c6833e1
 uninstall-local::
c6833e1
 	$(Echo) Uninstalling Documentation
c6833e1
-	$(Verb) $(RM) -rf $(PROJ_docsdir)
c6833e1
+	$(Verb) $(RM) -rf $(DESTDIR)$(PROJ_docsdir)
c6833e1
diff --git docs/tutorial/Makefile docs/tutorial/Makefile
c6833e1
index 6169bb8..9082ad4 100644
c6833e1
--- docs/tutorial/Makefile
c6833e1
+++ docs/tutorial/Makefile
c6833e1
@@ -12,7 +12,7 @@ include $(LEVEL)/Makefile.common
c6833e1
 
c6833e1
 HTML       := $(wildcard $(PROJ_SRC_DIR)/*.html)
c6833e1
 EXTRA_DIST := $(HTML) index.html
c6833e1
-HTML_DIR   := $(PROJ_docsdir)/html/tutorial
c6833e1
+HTML_DIR   := $(DESTDIR)$(PROJ_docsdir)/html/tutorial
c6833e1
 
c6833e1
 install-local:: $(HTML)
c6833e1
 	$(Echo) Installing HTML Tutorial Documentation
c6833e1
diff --git lib/VMCore/Makefile lib/VMCore/Makefile
c6833e1
index e9d3dc8..c4817a5 100644
c6833e1
--- lib/VMCore/Makefile
c6833e1
+++ lib/VMCore/Makefile
c6833e1
@@ -29,5 +29,5 @@ $(GENFILE): $(ObjDir)/Intrinsics.gen.tmp
c6833e1
 	    changed significantly. )
c6833e1
 
c6833e1
 install-local:: $(GENFILE)
c6833e1
-	$(Echo) Installing $(PROJ_includedir)/llvm/Intrinsics.gen
c6833e1
-	$(Verb) $(DataInstall) $(GENFILE) $(PROJ_includedir)/llvm/Intrinsics.gen
c6833e1
+	$(Echo) Installing $(DESTDIR)$(PROJ_includedir)/llvm/Intrinsics.gen
c6833e1
+	$(Verb) $(DataInstall) $(GENFILE) $(DESTDIR)$(PROJ_includedir)/llvm/Intrinsics.gen
c6833e1
diff --git tools/gccas/Makefile tools/gccas/Makefile
c6833e1
index ff84d96..594f9e4 100644
c6833e1
--- tools/gccas/Makefile
c6833e1
+++ tools/gccas/Makefile
c6833e1
@@ -10,9 +10,9 @@ LEVEL = ../..
c6833e1
 
c6833e1
 include $(LEVEL)/Makefile.common
c6833e1
 
c6833e1
-install-local:: $(PROJ_bindir)/gccas
c6833e1
+install-local:: $(DESTDIR)$(PROJ_bindir)/gccas
c6833e1
 	
c6833e1
-$(PROJ_bindir)/gccas : gccas.sh Makefile
c6833e1
+$(DESTDIR)$(PROJ_bindir)/gccas : gccas.sh Makefile
c6833e1
 	$(Echo) Installing gccas shell script.
c6833e1
 	$(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
c6833e1
 	$(Verb) chmod 0755 $@
c6833e1
diff --git tools/gccld/Makefile tools/gccld/Makefile
c6833e1
index b2d3f73..8ec0307 100644
c6833e1
--- tools/gccld/Makefile
c6833e1
+++ tools/gccld/Makefile
c6833e1
@@ -11,9 +11,9 @@ LEVEL = ../..
c6833e1
 
c6833e1
 include $(LEVEL)/Makefile.common
c6833e1
 
c6833e1
-install-local:: $(PROJ_bindir)/gccld
c6833e1
+install-local:: $(DESTDIR)$(PROJ_bindir)/gccld
c6833e1
 	
c6833e1
-$(PROJ_bindir)/gccld : gccld.sh Makefile
c6833e1
+$(DESTDIR)$(PROJ_bindir)/gccld : gccld.sh Makefile
c6833e1
 	$(Echo) Installing gccld shell script.
c6833e1
 	$(Verb) sed "s#@TOOLDIR@#$(PROJ_bindir)#" $< > $@
c6833e1
 	$(Verb) chmod 0755 $@
c6833e1
diff --git tools/llvm-config/Makefile tools/llvm-config/Makefile
c6833e1
index 6eedca0..8659681 100644
c6833e1
--- tools/llvm-config/Makefile
c6833e1
+++ tools/llvm-config/Makefile
c6833e1
@@ -87,6 +87,6 @@ clean-local::
c6833e1
 	  $(LibDeps) GenLibDeps.out
c6833e1
 install-local:: all-local
c6833e1
 	$(Echo) Installing llvm-config
c6833e1
-	$(Verb) $(MKDIR) $(PROJ_bindir)
c6833e1
-	$(Verb) $(ScriptInstall) $(ToolDir)/llvm-config $(PROJ_bindir)
c6833e1
+	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_bindir)
c6833e1
+	$(Verb) $(ScriptInstall) $(ToolDir)/llvm-config $(DESTDIR)$(PROJ_bindir)
c6833e1
 
c6833e1
c6833e1
--------------1.6.4--
c6833e1
c6833e1