1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
#
#ident "@(#)smail:RELEASE-3_2_0_115:Makefile,v 1.25 2003/06/18 07:03:38 woods Exp"
#
# Top-level makefile for the smail source tree
#
# Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
# Copyright (C) 1992 Ronald S. Karr
#
# See the file COPYING, distributed with smail, for restriction
# and warranty information.
SHELL=/bin/sh
MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
MKDIRS=${ROOT}/conf/lib/mkdirs.sh
MKDEFS=${ROOT}/conf/lib/mkdefs.sh
CHECKDEFS=${ROOT}/conf/lib/checkdefs.sh
INST=${ROOT}/conf/lib/inst.sh
INSTM=${ROOT}/conf/lib/instm.sh
XEXEC=${SHELL} ${ROOT}/conf/lib/xexec.sh
DEFS_SH=defs.sh
DEFS_H=defs.h
DEFS_SED=defs.sed
ROOT=.
SUB_DIRS=conf compat pd util src man
MORE_SUB_DIRS=guide NOTES
all install clean clobber depend lint mkdefs tags TAGS: ${DEFS_H} ${DEFS_SH} ${DEFS_SED} .MAKE
@for i in ${SUB_DIRS}; do \
echo "Making $@ under $$i ..."; \
(cd $$i && { if [ -f .depend ] ; then \
DEPMKFILE="-f Makefile -f .depend"; \
fi; ${MAKE} $$DEPMKFILE $@; } ); \
rc=$$?; \
if [ $$rc -ne 0 ] ; then \
exit $$rc; \
fi; \
done
everything: all all-more-subdirs
all-more-subdirs: ${DEFS_H} ${DEFS_SH} ${DEFS_SED} .MAKE
@for i in ${MORE_SUB_DIRS}; do \
echo "Making all under $$i ..."; \
(cd $$i && { if [ -f .depend ] ; then \
DEPMKFILE="-f Makefile -f .depend"; \
fi; ${MAKE} $$DEPMKFILE all; } ); \
rc=$$?; \
if [ $$rc -ne 0 ] ; then \
exit $$rc; \
fi; \
done
${DEFS_H} ${DEFS_SH} ${DEFS_SED}: ${ROOT}/conf/EDITME
ROOT=${ROOT} ${SHELL} ${MKDEFS}
${ROOT}/conf/EDITME: .MAKE # cannot depend on anything else!
cd ${ROOT}/conf && ${MAKE} EDITME
depend: local-depend
local-depend: check_defs
@rm -f .depend
. ./${DEFS_SH}; echo "$$DEFS_DEPEND" >> .depend
# Note: don't try to source DEFS_SH and thus don't use XEXEC
#
check_defs:
SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
mkdefs: ${DEFS_H} ${DEFS_SH} ${DEFS_SED}
install: local-install
local-install: ${DEFS_SH}
@. ./${DEFS_SH}; \
case "$$DONT_INSTALL" in \
?*) echo Testing only ... $@ ignored; exit 0;; \
esac; \
${XEXEC} ${SHELL} ${INSTM} -r -m 0444 $$LIB_DIR COPYING
install-everything: install install-more-subdirs
install-more-subdirs: ${DEFS_SH} .MAKE
@for i in ${MORE_SUB_DIRS}; do \
echo "Install targets under $$i ..."; \
(cd $$i && { if [ -f .depend ] ; then \
DEPMKFILE="-f Makefile -f .depend"; \
fi; ${MAKE} $$DEPMKFILE install; } ); \
rc=$$?; \
if [ $$rc -ne 0 ] ; then \
exit $$rc; \
fi; \
done
clobber: clobber-local
clobber-local:
rm -f .depend
rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}
.MAKE:
.PHONY: all install local-install clean local-clean clobber local-clobber depend local-depend lint mkdefs check_defs tags TAGS
.PHONY: everything all-more-subdirs install-everything install-more-subdirs installman install.man .MAKE
|