blob: 9ff12d8e05d5b536fae8e3dd4a707981b0ed5756 [file] [log] [blame]
# You can do "make SUB=blah" to make only a few, or edit here, or both
# You can also run make directly in the subdirs you want.
SUB = lib common tftp tftpd MCONFIG aconfig.h version.h
$(MAKE) -C $(patsubst, %, $@)
%.install: MCONFIG aconfig.h version.h
$(MAKE) -C $(patsubst %.install, %, $@) install
$(MAKE) -C $(patsubst %.clean, %, $@) clean
$(MAKE) -C $(patsubst %.distclean, %, $@) distclean
all: MCONFIG $(patsubst %,, $(SUB))
install: MCONFIG $(patsubst %, %.install, $(SUB))
clean: localclean $(patsubst %, %.clean, $(SUB))
rm -f version.h
distclean: localdistclean $(patsubst %, %.distclean, $(SUB))
localdistclean: localclean
rm -f MCONFIG config.status config.log aconfig.h *~ \#*
rm -rf *.cache
find . -type f \( -name \*.orig -o -name \*.rej \) | xargs rm -f
spotless: distclean
rm -f configure tftp.spec
autoconf: configure
config: MCONFIG aconfig.h
$(MAKE) autoconf
$(MAKE) tftp.spec
$(MAKE) distclean
MCONFIG: configure
if test -x config.status; then \
./config.status --recheck && ./config.status ; \
else \
./configure ; \
aconfig.h: MCONFIG
: Generated by side effect
# Adding "configure" to the dependencies serializes this with running
# autoconf, because there are apparently race conditions between
# autoconf and autoheader. configure aclocal.m4
rm -f aconfig.h
configure: aclocal.m4
rm -rf MCONFIG configure config.log aconfig.h *.cache
version.h: version
echo \#define VERSION \"tftp-hpa `cat version`\" > version.h
tftp.spec: version
sed -e "s/@@VERSION@@/`cat version`/g" < $< > $@ || rm -f $@