Change a couple of Makefile.ins to plain Makefiles
[freeradius.git] / Makefile
1 #
2 # Makefile      Makefile for the cistron-radius package.
3 #
4 #               NOTE: This top-level Makefile must not
5 #               use GNU-make extensions. The lower ones can.
6 #
7 # Version:      $Id$
8 #
9
10 include Make.inc
11
12 SUBDIRS         = src raddb doc scripts
13 WHAT_TO_MAKE    = all
14
15 all:
16         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
17
18 clean:
19         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
20         @rm -f *~ stamp*
21
22 install:
23         @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common
24
25 common:
26         @for dir in $(SUBDIRS); do \
27                 echo "Making $(WHAT_TO_MAKE) in $$dir..."; \
28                 (cd $$dir ; $(MAKE) $(MFLAGS) $(WHAT_TO_MAKE)) || exit 1;\
29         done
30
31 distclean: clean
32         rm -f config.cache config.log config.status
33         -find . ! -name configure.in -name \*.in -print | \
34                 sed 's/\.in$$//' | \
35                 while read file; do rm -f $$file; done
36
37 ######################################################################
38 #
39 #  Automatic remaking rules suggested by info:autoconf#Automatic_Remaking
40 #
41 ######################################################################
42 configure: configure.in
43         autoconf
44
45 # autoheader might not change config.h.in, so touch a stamp file
46 config.h.in: stamp-h.in
47 stamp-h.in: configure.in acconfig.h config.h.top config.h.bot
48         autoheader
49         echo timestamp > stamp-h.in
50
51 config.h: stamp-h
52 stamp-h: config.h.in config.status
53         ./config.status
54
55 config.status: configure
56         ./config.status --recheck