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);
26 $(INSTALL) -d -m 755 $(R)$(mandir)/man$$i; \
27 $(INSTALL) -m 644 man/man$$i/*.$$i $(R)$(mandir)/man$$i; \
29 @echo "Creating/updating files in $(R)$(raddbdir)"; \
30 $(INSTALL) -d -m 755 $(R)$(raddbdir); \
32 for i in [a-c]* [e-z]*; do \
33 [ $$i != radiusd.conf.in -a ! -f $(R)$(raddbdir)/$$i ] && \
34 $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
36 for i in dictionary*; do \
37 [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
38 if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
39 echo "** $(R)$(raddbdir)/$$i"; \
44 echo "** The samples in ../raddb are newer than these files";\
45 echo "** Please investigate and copy manually if appropriate";\
49 @for dir in $(SUBDIRS); do \
50 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
51 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
55 rm -f config.cache config.log config.status libtool \
56 src/include/radpaths.h src/include/stamp-h \
57 libltdl/config.log libltdl/config.status \
59 -find . ! -name configure.in -name \*.in -print | \
61 while read file; do rm -f $$file; done
62 -find src/modules -name config.mak | \
63 while read file; do rm -f $$file; done
64 -find src/modules -name config.h | \
65 while read file; do rm -f $$file; done
67 ifndef prefix # catch runs without configuring, and give helpful advice.
69 @echo " Sorry! You must run 'configure', before 'make'.";
73 ######################################################################
75 # Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
77 ######################################################################
78 reconfig: configure src/include/autoconf.h.in
80 configure: configure.in aclocal.m4
83 # autoheader might not change autoconf.h.in, so touch a stamp file
84 src/include/autoconf.h.in: src/include/stamp-h.in acconfig.h
85 src/include/stamp-h.in: configure.in acconfig.h
87 echo timestamp > src/include/stamp-h.in
89 src/include/autoconf.h: src/include/stamp-h
90 src/include/stamp-h: src/include/autoconf.h.in config.status
93 config.status: configure
94 ./config.status --recheck