Move the 'install' target for raddb from the top-level Makefile
authoraland <aland>
Thu, 13 Feb 2003 16:53:15 +0000 (16:53 +0000)
committeraland <aland>
Thu, 13 Feb 2003 16:53:15 +0000 (16:53 +0000)
to raddb/Makefile, where it makes a bit more sense.

Fixed the update/over-write of the configuration files.

Always over-write the dictionary files.  People shouldn't be
editing them...

Makefile
raddb/Makefile

index 016178e..f9c523f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,35 +38,11 @@ install:
                        $(INSTALL) -m 644 $$p $(R)$(mandir)/man$$i; \
                done \
        done
-       @echo "Creating/updating files in $(R)$(raddbdir)"; \
-       cd raddb; \
-       for i in [a-c]* [e-z]*; do \
-               [ $$i != radiusd.conf.in -a ! -f $(R)$(raddbdir)/$$i ] && \
-                $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
-       done; \
-       chmod 600 $(R)$(raddbdir)/naspasswd $(R)$(raddbdir)/clients $(R)$(raddbdir)/clients.conf;
-       @echo "Creating/updating files in $(R)$(dictdir)"; \
+       @echo "Installing dictionary files in $(R)$(dictdir)"; \
        cd share; \
        for i in dictionary*; do \
-               [ ! -f $(R)$(dictdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(dictdir); \
-               if [ "`find $$i -newer $(R)$(dictdir)/$$i`" ]; then \
-                       echo "** $(R)$(dictdir)/$$i"; \
-                       nt=1; \
-               fi; \
+               $(INSTALL) -m 644 $$i $(R)$(dictdir); \
        done; \
-       if [ "$$nt" ]; then \
-               echo "**";\
-               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
-               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
-               echo "**";\
-               echo "** The sample configuration files in `pwd`";\
-               echo "** are newer than those in $(R)$(dictdir)";\
-               echo "**";\
-               echo "** Please investigate and manually copy (if appropriate) the files listed above.";\
-               echo "**";\
-               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
-               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
-       fi
 
 common:
        @for dir in $(SUBDIRS); do \
index 73c6a99..9d641ee 100644 (file)
@@ -1,9 +1,40 @@
-
 include ../Make.inc
 
+#
+#  The list of files to install.
+#
+FILES  = acct_users attrs clients clients.conf dictionary \
+         experimental.conf hints huntgroups ldap.attrmap \
+         mssql.conf naslist naspasswd oraclesql.conf postgresql.conf \
+         preproxy_users proxy.conf radiusd.conf realms snmp.conf \
+         sql.conf users x99.conf x99passwd.sample
+
 all:
 
 install:
+       $(INSTALL) -d -m 755    $(R)$(raddbdir)
+       @echo "Creating/updating files in $(R)$(raddbdir)"; \
+       for i in $(FILES); do \
+               [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
+               if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
+                       echo "** $(R)$(raddbdir)/$$i"; \
+                       nt=1; \
+               fi; \
+       done; \
+       if [ "$$nt" ]; then \
+               echo "**";\
+               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+               echo "**";\
+               echo "** The sample configuration files in `pwd`";\
+               echo "** are newer than those in $(R)$(raddbdir)";\
+               echo "**";\
+               echo "** Please investigate and manually copy (if appropriate) the files listed above.";\
+               echo "**";\
+               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+               echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+       fi
+       chmod 600 $(R)$(raddbdir)/naspasswd $(R)$(raddbdir)/clients $(R)$(raddbdir)/clients.conf
 
 clean: