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