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 for p in man/man$$i/*.$$i; do \
28 $(INSTALL) -m 644 $$p $(R)$(mandir)/man$$i; \
31 @echo "Creating/updating files in $(R)$(raddbdir)"; \
32 $(INSTALL) -d -m 755 $(R)$(raddbdir); \
34 for i in [a-c]* [e-z]*; do \
35 [ $$i != radiusd.conf.in -a ! -f $(R)$(raddbdir)/$$i ] && \
36 $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
38 for i in dictionary*; do \
39 [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
40 if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
41 echo "** $(R)$(raddbdir)/$$i"; \
46 echo "** The samples in ../raddb are newer than these files";\
47 echo "** Please investigate and copy manually if appropriate";\
51 @for dir in $(SUBDIRS); do \
52 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
53 (cd $$dir && $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
57 rm -f config.cache config.log config.status libtool \
58 src/include/radpaths.h src/include/stamp-h \
59 libltdl/config.log libltdl/config.status \
61 -find . ! -name configure.in -name \*.in -print | \
63 while read file; do rm -f $$file; done
64 -find src/modules -name config.mak | \
65 while read file; do rm -f $$file; done
66 -find src/modules -name config.h | \
67 while read file; do rm -f $$file; done
69 ifndef prefix # catch runs without configuring, and give helpful advice.
71 @echo " Sorry! You must run 'configure', before 'make'.";
75 ######################################################################
77 # Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
79 ######################################################################
80 reconfig: configure src/include/autoconf.h.in
82 configure: configure.in aclocal.m4
85 # autoheader might not change autoconf.h.in, so touch a stamp file
86 src/include/autoconf.h.in: src/include/stamp-h.in acconfig.h
87 src/include/stamp-h.in: configure.in acconfig.h
89 echo timestamp > src/include/stamp-h.in
91 src/include/autoconf.h: src/include/stamp-h
92 src/include/stamp-h: src/include/autoconf.h.in config.status
95 config.status: configure
96 ./config.status --recheck