2 # Makefile Makefile for the cistron-radius package.
4 # NOTE: This top-level Makefile must not
5 # use GNU-make extensions. The lower ones can.
12 SUBDIRS = libltdl src raddb doc scripts
16 @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
19 @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
23 @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
24 $(INSTALL) -d -m 755 $(R)$(mandir);
25 $(INSTALL) -d -m 755 $(R)$(RUNDIR);
27 $(INSTALL) -d -m 755 $(R)$(mandir)/man$$i; \
28 for p in man/man$$i/*.$$i; do \
29 $(INSTALL) -m 644 $$p $(R)$(mandir)/man$$i; \
32 @echo "Creating/updating files in $(R)$(raddbdir)"; \
33 $(INSTALL) -d -m 755 $(R)$(raddbdir); \
35 for i in [a-c]* [e-z]*; do \
36 [ $$i != radiusd.conf.in -a ! -f $(R)$(raddbdir)/$$i ] && \
37 $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
39 for i in dictionary*; do \
40 [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
41 if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
42 echo "** $(R)$(raddbdir)/$$i"; \
47 echo "** The samples in ../raddb are newer than these files";\
48 echo "** Please investigate and copy manually if appropriate";\
52 @for dir in $(SUBDIRS); do \
53 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
54 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
58 rm -f config.cache config.log config.status libtool \
59 src/include/radpaths.h src/include/stamp-h \
60 libltdl/config.log libltdl/config.status \
62 -find . ! -name configure.in -name \*.in -print | \
64 while read file; do rm -f $$file; done
65 -find src/modules -name config.mak | \
66 while read file; do rm -f $$file; done
67 -find src/modules -name config.h | \
68 while read file; do rm -f $$file; done
70 ifndef prefix # catch runs without configuring, and give helpful advice.
72 @echo " Sorry! You must run 'configure', before 'make'.";
76 ######################################################################
78 # Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
80 ######################################################################
81 reconfig: configure src/include/autoconf.h.in
83 configure: configure.in aclocal.m4
86 # autoheader might not change autoconf.h.in, so touch a stamp file
87 src/include/autoconf.h.in: src/include/stamp-h.in acconfig.h
88 src/include/stamp-h.in: configure.in acconfig.h
90 echo timestamp > src/include/stamp-h.in
92 src/include/autoconf.h: src/include/stamp-h
93 src/include/stamp-h: src/include/autoconf.h.in config.status
96 config.status: configure
97 ./config.status --recheck