summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-08-20 09:20:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-08-20 09:20:05 +0000
commitfc9450855d5c6d13dd59773e43a660303f8a9de5 (patch)
tree01afc8ef5ab917bb1abfda4eb23536b41a7fa63e /Makefile.rules
parent9a8fedd6f96f993b82df164dee29a423ce9da839 (diff)
downloadllvm-fc9450855d5c6d13dd59773e43a660303f8a9de5.tar.gz
llvm-fc9450855d5c6d13dd59773e43a660303f8a9de5.tar.bz2
llvm-fc9450855d5c6d13dd59773e43a660303f8a9de5.tar.xz
Added a set of rules for installing configuration files. You can now say
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
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index b062427208..a4bdb1c93a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -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:
#