Added a set of rules for installing configuration files. You can now say
authorReid Spencer <rspencer@reidspencer.com>
Fri, 20 Aug 2004 09:20:05 +0000 (09:20 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 20 Aug 2004 09:20:05 +0000 (09:20 +0000)
CONFIG_FILES=a b c
in a Makefile and when you "make install" the files a b and c will get
installed into the $prefix/etc directory.

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

Makefile.rules

index b0624272087775030dbff205ea439daeefd3a80e..a4bdb1c93a0869550458e6e71560a6c6456cdb18 100644 (file)
@@ -455,6 +455,22 @@ all install clean test bytecode stripped-bytecode install-bytecode::
        done
 endif
 
+#---------------------------------------------------------
+# Handle the CONFIG_FILES options
+#---------------------------------------------------------
+ifdef CONFIG_FILES
+install:: $(sysconfdir) install-config-files
+
+$(sysconfdir):
+       $(MKDIR) $(sysconfdir)
+
+install-config-files: $(CONFIG_FILES)
+       $(VERB) echo Installing Configuration Files To $(sysconfdir)
+       $(VERB) for file in $(CONFIG_FILES); do \
+               $(INSTALL) $(SourceDir)/$${file} $(sysconfdir) ; \
+       done
+endif
+
 ###########################################################################
 # Library Build Rules:
 #