xref: /netbsd-src/external/bsd/am-utils/dist/m4/GNUmakefile (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1*a53f50b9Schristos#
2*a53f50b9Schristos# THIS MAKEFILE IS FOR am-utils maintainers only!
3*a53f50b9Schristos#
4*a53f50b9Schristos# GNUmakefile for remaking configuration files.
5*a53f50b9Schristos#
6*a53f50b9Schristos# Erez Zadok <ezk@cs.columbia.edu>
7*a53f50b9Schristos#
8*a53f50b9Schristos
9*a53f50b9SchristosAUTOCONF=autoconf --localdir=./m4 ./m4/configure.in
10*a53f50b9SchristosAUTOHEADER=autoheader --localdir=./m4 ./m4/configure.in
11*a53f50b9Schristos#AUTOMAKE=./m4/automake --include-deps --amdir=./m4/amdir
12*a53f50b9Schristos#AUTOMAKE=automake --include-deps --no-intermediates --localdir=./m4
13*a53f50b9Schristos#AUTOMAKE=automake --include-deps --localdir=./m4
14*a53f50b9SchristosAUTOMAKE=automake --include-deps --altdir=./m4
15*a53f50b9SchristosACLOCAL=aclocal --altdir=./m4
16*a53f50b9SchristosMK_ACLOCAL=./mk-aclocal
17*a53f50b9Schristos
18*a53f50b9SchristosCUTWARNMSG="warning: AC_TRY_RUN called without default to allow cross compilin"
19*a53f50b9SchristosCUTWARNMSG2="AC_OUTPUT_COMMANDS|autoupdate"
20*a53f50b9SchristosAMFILES=../Makefile.am $(wildcard ../*/Makefile.am)
21*a53f50b9SchristosINAMFILES=$(AMFILES:.am=.in)
22*a53f50b9SchristosACFILES=$(wildcard macros/*.m4 macros/HEADER macros/TRAILER m4/aclocal.m4)
23*a53f50b9Schristos
24*a53f50b9SchristosLOG=/tmp/amu-${USER}.log
25*a53f50b9Schristos
26*a53f50b9SchristosTOPDIR=..
27*a53f50b9SchristosVPATH=
28*a53f50b9Schristos
29*a53f50b9Schristosall: testdir ${TOPDIR}/configure config.h.in ${TOPDIR}/Makefile.in \
30*a53f50b9Schristos	GNUmakefile stamp-h.in
31*a53f50b9Schristos
32*a53f50b9Schristosconfig: all $(TOPDIR)/buildall aux_conf.h.in
33*a53f50b9Schristos	(cd ${TOPDIR} && ./buildall -c)
34*a53f50b9Schristos
35*a53f50b9Schristosdconfig: all $(TOPDIR)/buildall aux_conf.h.in
36*a53f50b9Schristos	(cd ${TOPDIR} && ./buildall -C)
37*a53f50b9Schristos
38*a53f50b9Schristosqconfig: all $(TOPDIR)/buildall aux_conf.h.in
39*a53f50b9Schristos	(cd ${TOPDIR} && ./buildall -q)
40*a53f50b9Schristos
41*a53f50b9Schristosbuild: all $(TOPDIR)/buildall aux_conf.h.in
42*a53f50b9Schristos	(cd ${TOPDIR} && ./buildall -b)
43*a53f50b9Schristos
44*a53f50b9Schristosworld: all $(TOPDIR)/buildall aux_conf.h.in
45*a53f50b9Schristos	(cd ${TOPDIR} && ./buildall)
46*a53f50b9Schristos
47*a53f50b9Schristostestdir: ${TOPDIR}/amd/amd.c
48*a53f50b9Schristos
49*a53f50b9Schristos${TOPDIR}/configure: configure.in aclocal.m4
50*a53f50b9Schristos	-(cd ${TOPDIR} && ${AUTOCONF} > configure.new 2> ${LOG})
51*a53f50b9Schristos	-@egrep -v ${CUTWARNMSG} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
52*a53f50b9Schristos	@echo '############################################################'
53*a53f50b9Schristos	@echo 'Checking for "AC_OUTPUT_COMMANDS" warnings:'
54*a53f50b9Schristos	@echo ' (If you see any output, fix this when autoconf/automake are'
55*a53f50b9Schristos	@echo '  back in sync in their CVS trees. -ezk, 2/10/00)'
56*a53f50b9Schristos	-@egrep ${CUTWARNMSG2} ${LOG}
57*a53f50b9Schristos	-@egrep -v ${CUTWARNMSG2} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
58*a53f50b9Schristos	@echo '############################################################'
59*a53f50b9Schristos	@if test -s ${LOG}; then cat ${LOG}; exit 2; fi
60*a53f50b9Schristos	-mv ../configure ../configure.old
61*a53f50b9Schristos	mv ../configure.new ../configure
62*a53f50b9Schristos	rm -f ../configure.old
63*a53f50b9Schristos	chmod a+rx $@
64*a53f50b9Schristos
65*a53f50b9Schristosconfig.h.in: configure.in acconfig.h
66*a53f50b9Schristos	-(cd ${TOPDIR} && ${AUTOHEADER} > ./m4/config.h.in 2> ${LOG})
67*a53f50b9Schristos	-@egrep -v ${CUTWARNMSG} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
68*a53f50b9Schristos	@echo '############################################################'
69*a53f50b9Schristos	@echo 'Checking for "AC_OUTPUT_COMMANDS" warnings:'
70*a53f50b9Schristos	@echo ' (If you see any output, fix this when autoconf/automake are'
71*a53f50b9Schristos	@echo '  back in sync in their CVS trees. -ezk, 2/10/00)'
72*a53f50b9Schristos	-@egrep ${CUTWARNMSG2} ${LOG}
73*a53f50b9Schristos	-@egrep -v ${CUTWARNMSG2} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
74*a53f50b9Schristos	@echo '############################################################'
75*a53f50b9Schristos	@if test -s ${LOG}; then cat ${LOG}; exit 2; fi
76*a53f50b9Schristos
77*a53f50b9Schristos${TOPDIR}/Makefile.in: ${AMFILES} configure.in aclocal.m4
78*a53f50b9Schristos	(cd ${TOPDIR} && ${AUTOMAKE})
79*a53f50b9Schristos	@rm -f ${LOG}
80*a53f50b9Schristos
81*a53f50b9Schristosaclocal.m4: ${ACFILES} configure.in
82*a53f50b9Schristos	rm -f $@
83*a53f50b9Schristos	${MK_ACLOCAL} > acinclude.m4
84*a53f50b9Schristos	(cd ${TOPDIR} && ${ACLOCAL})
85*a53f50b9Schristos
86*a53f50b9Schristosstamp-h.in: ${AMFILES} config.h.in aclocal.m4 aux_conf.h.in
87*a53f50b9Schristos	echo timestamp > $@
88*a53f50b9Schristos
89*a53f50b9Schristosclean:
90*a53f50b9Schristos	rm -f ${TOPDIR}/configure config.h.in $(INAMFILES) aclocal.m4 stamp.h.in
91*a53f50b9Schristos
92*a53f50b9Schristos##############################################################################
93*a53f50b9Schristos# maintainer rules to update autoconf/automake/libtool files distributed with
94*a53f50b9Schristos# am-utils. -Erez.
95*a53f50b9Schristos
96*a53f50b9SchristosP1s=/usr/share/automake
97*a53f50b9SchristosP2s=/usr/share/libtool
98*a53f50b9SchristosP1=/usr/local/gnu/lib/automake
99*a53f50b9SchristosP2=/usr/local/gnu/lib/libtool
100*a53f50b9SchristosP3=/misc/mirror/gnu/prep/config
101*a53f50b9SchristosP4=/misc/mirror/gnu/prep/GNUinfo
102*a53f50b9SchristosICMD=./m4/copy-if-newbig
103*a53f50b9SchristosCPCMD=cp -p
104*a53f50b9Schristos
105*a53f50b9Schristosupdate:		\
106*a53f50b9Schristos	config.guess	\
107*a53f50b9Schristos	config.sub	\
108*a53f50b9Schristos	doc/texinfo.tex
109*a53f50b9Schristos# 	depcomp		\
110*a53f50b9Schristos# 	install-sh	\
111*a53f50b9Schristos# 	ltconfig	\
112*a53f50b9Schristos# 	ltmain.sh	\
113*a53f50b9Schristos# 	mdate-sh	\
114*a53f50b9Schristos# 	missing		\
115*a53f50b9Schristos# 	mkinstalldirs	\
116*a53f50b9Schristos
117*a53f50b9Schristosconfig.guess:: $(P1s)*/config.guess
118*a53f50b9Schristos	$(ICMD) $? $@
119*a53f50b9Schristosconfig.guess:: $(P2s)/config.guess
120*a53f50b9Schristos	$(ICMD) $? $@
121*a53f50b9Schristosconfig.guess:: $(P3)/config.guess
122*a53f50b9Schristos	$(ICMD) $? $@
123*a53f50b9Schristos
124*a53f50b9Schristosconfig.sub:: $(P1s)*/config.sub
125*a53f50b9Schristos	$(ICMD) $? $@
126*a53f50b9Schristosconfig.sub:: $(P2s)/config.sub
127*a53f50b9Schristos	$(ICMD) $? $@
128*a53f50b9Schristosconfig.sub:: $(P3)/config.sub
129*a53f50b9Schristos	$(ICMD) $? $@
130*a53f50b9Schristos
131*a53f50b9Schristosdepcomp:: $(P1)/depcomp
132*a53f50b9Schristos	$(CPCMD) $? $@
133*a53f50b9Schristos
134*a53f50b9Schristosinstall-sh: $(P1)/install-sh
135*a53f50b9Schristos	$(CPCMD) $? $@
136*a53f50b9Schristos
137*a53f50b9Schristosltconfig: $(P2)/ltconfig
138*a53f50b9Schristos	$(CPCMD) $? $@
139*a53f50b9Schristos
140*a53f50b9Schristosltmain.sh: $(P2)/ltmain.sh
141*a53f50b9Schristos	$(CPCMD) $? $@
142*a53f50b9Schristos
143*a53f50b9Schristosmdate-sh: $(P1)/mdate-sh
144*a53f50b9Schristos	$(CPCMD) $? $@
145*a53f50b9Schristos
146*a53f50b9Schristosmissing: $(P1)/missing
147*a53f50b9Schristos	$(CPCMD) $? $@
148*a53f50b9Schristos
149*a53f50b9Schristosmkinstalldirs: $(P1)/mkinstalldirs
150*a53f50b9Schristos	$(CPCMD) $? $@
151*a53f50b9Schristos
152*a53f50b9Schristosdoc/texinfo.tex: $(P4)/texinfo.tex
153*a53f50b9Schristos	$(CPCMD) $? $@
154*a53f50b9Schristos
155*a53f50b9Schristos##############################################################################
156