$NetBSD: patch-ac,v 1.7 2013/06/30 12:58:37 obache Exp $

--- Makefile.rules.orig	2012-10-12 21:48:14.000000000 +0000
+++ Makefile.rules
@@ -97,7 +97,7 @@ endif
 $(LLVMBuildMakeFrag): $(PROJ_SRC_ROOT)/Makefile.rules \
 		      $(PROJ_OBJ_ROOT)/Makefile.config
 	$(Echo) Constructing LLVMBuild project information.
-	$(Verb) $(LLVMBuildTool) \
+	$(Verb) python $(LLVMBuildTool) \
 	  --native-target "$(TARGET_NATIVE_ARCH)" \
 	  --enable-targets "$(TARGETS_TO_BUILD)" \
 	  --enable-optional-components "$(OPTIONAL_COMPONENTS)" \
@@ -638,11 +638,6 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), 
   ifneq ($(HOST_OS), Darwin)
     ifdef TOOLNAME
       LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
-      ifdef EXAMPLE_TOOL
-        LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
-      else
-        LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
-    endif
   endif
 else
   ifneq ($(DARWIN_MAJVERS),4)
@@ -838,9 +833,6 @@ endif
 # in the file so they get built before dependencies
 #---------------------------------------------------------
 
-$(DESTDIR)$(PROJ_bindir) $(DESTDIR)$(PROJ_libdir) $(DESTDIR)$(PROJ_includedir) $(DESTDIR)$(PROJ_etcdir)::
-	$(Verb) $(MKDIR) $@
-
 # To create other directories, as needed, and timestamp their creation
 %/.dir:
 	$(Verb) $(MKDIR) $* > /dev/null
@@ -975,7 +967,9 @@ install-local::
 uninstall-local::
 	$(Echo) UnInstall circumvented with NO_INSTALL
 else
-install-local:: $(DESTDIR)$(PROJ_etcdir) $(CONFIG_FILES)
+PROJ_etcdir=${PREFIX}/share/examples/llvm
+install-local:: $(CONFIG_FILES)
+	$(MKDIR) ${PROJ_etcdir}
 	$(Echo) Installing Configuration Files To $(DESTDIR)$(PROJ_etcdir)
 	$(Verb)for file in $(CONFIG_FILES); do \
           if test -f $(PROJ_OBJ_DIR)/$${file} ; then \
@@ -1397,7 +1391,7 @@ install-local:: $(DestArchiveLib)
 $(DestArchiveLib): $(LibName.A) $(DESTDIR)$(PROJ_libdir)
 	$(Echo) Installing $(BuildMode) Archive Library $(DestArchiveLib)
 	$(Verb) $(MKDIR) $(DESTDIR)$(PROJ_libdir)
-	$(Verb) $(INSTALL) $(LibName.A) $(DestArchiveLib)
+	$(Verb) $(DataInstall) $(LibName.A) $(DestArchiveLib)
 
 uninstall-local::
 	$(Echo) Uninstalling $(BuildMode) Archive Library $(DestArchiveLib)
