Grammar fix (-p option.)
[tftp-hpa.git] / Makefile
blob9a5740517ccaff7240e8b88703194601150fdf6d
1 # You can do "make SUB=blah" to make only a few, or edit here, or both
2 # You can also run make directly in the subdirs you want.
4 SUB = lib tftp tftpd
6 %.build: MCONFIG acconfig.h version.h
7 $(MAKE) -C $(patsubst %.build, %, $@)
9 %.install: MCONFIG acconfig.h version.h
10 $(MAKE) -C $(patsubst %.install, %, $@) install
12 %.clean:
13 $(MAKE) -C $(patsubst %.clean, %, $@) clean
15 %.distclean:
16 $(MAKE) -C $(patsubst %.distclean, %, $@) distclean
18 all: MCONFIG $(patsubst %, %.build, $(SUB))
20 tftp.build: lib.build
21 tftpd.build: lib.build
23 install: MCONFIG $(patsubst %, %.install, $(SUB))
25 clean: localclean $(patsubst %, %.clean, $(SUB))
27 localclean:
28 rm -f version.h
30 distclean: localdistclean $(patsubst %, %.distclean, $(SUB))
32 localdistclean:
33 rm -f MCONFIG config.status config.log acconfig.h *~ \#*
34 rm -rf *.cache
35 find . -type f \( -name \*.orig -o -name \*.rej \) | xargs -r rm -f
37 spotless: distclean
38 rm -f configure acconfig.h.in
40 autoconf: configure acconfig.h.in
42 config: MCONFIG acconfig.h
44 release:
45 $(MAKE) autoconf
46 $(MAKE) distclean
48 MCONFIG: configure MCONFIG.in acconfig.h.in
49 ./configure
51 acconfig.h: MCONFIG
52 : Generated by side effect
54 # Adding "configure" to the dependencies serializes this with running
55 # autoconf, because there are apparently race conditions between
56 # autoconf and autoheader.
57 acconfig.h.in: configure.in configure aclocal.m4
58 rm -f acconfig.h.in acconfig.h
59 autoheader -f
61 configure: configure.in aclocal.m4
62 rm -f MCONFIG configure config.log acconfig.h config.cache
63 autoconf
65 version.h: version
66 echo \#define VERSION \"tftp-hpa `cat version`\" > version.h