Allow configuration files to be themselves configured and found in the
authorReid Spencer <rspencer@reidspencer.com>
Tue, 23 Nov 2004 05:59:53 +0000 (05:59 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 23 Nov 2004 05:59:53 +0000 (05:59 +0000)
OBJ dir instead of only in the SRC dir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18143 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 1438f916943baad74ae4a0fc1df74ea67bef506a..a05a8d5b0aa27ce1645e7d9a9b20556e0393441d 100644 (file)
@@ -432,7 +432,13 @@ ifdef CONFIG_FILES
 install-local:: $(sysconfdir) $(CONFIG_FILES)
        $(Echo) Installing Configuration Files To $(sysconfdir)
        $(Verb)for file in $(CONFIG_FILES); do \
-               $(INSTALL) $(BUILD_SRC_DIR)/$${file} $(sysconfdir) ; \
+          if test -f $(BUILD_OBJ_DIR)/$${file} ; then \
+            $(INSTALL) $(BUILD_OBJ_DIR)/$${file} $(sysconfdir) ; \
+          elif test -f $(BUILD_SRC_DIR)/$${file} ; then \
+            $(INSTALL) $(BUILD_SRC_DIR)/$${file} $(sysconfdir) ; \
+          else \
+            $(ECHO) Error: cannot find config file $${file}. ; \
+          fi \
        done
 
 uninstall-local::