diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-19 13:59:30 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-19 13:59:30 +0000 |
commit | 0b7b2c69ec83497d9accab064da0f4ad07662d42 (patch) | |
tree | e8f22a2acecbf3035850f56beb1c8161c53cdf2d /Build/source/texk/web2c/am | |
parent | ee507bbd1fc483c58acb33cca25509a4dd81df9b (diff) |
prepare for new build system
git-svn-id: svn://tug.org/texlive/trunk@12429 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/am')
-rw-r--r-- | Build/source/texk/web2c/am/bootstrap.am | 110 | ||||
-rw-r--r-- | Build/source/texk/web2c/am/cweb.am | 30 | ||||
-rw-r--r-- | Build/source/texk/web2c/am/texmf.am | 108 | ||||
-rw-r--r-- | Build/source/texk/web2c/am/web.am | 166 |
4 files changed, 414 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/am/bootstrap.am b/Build/source/texk/web2c/am/bootstrap.am new file mode 100644 index 00000000000..ad01159d6f1 --- /dev/null +++ b/Build/source/texk/web2c/am/bootstrap.am @@ -0,0 +1,110 @@ +## texk/web2c/am/bootstrap.am: Makefile fragment for tangle and ctangle. + +## Bootstrapping tangle requires making it with itself. We use the opportunity +## to create an up-to-date tangleboot as well. +bin_PROGRAMS += tangle +nodist_tangle_SOURCES = tangle.c tangle.h +tangle.c tangle.h: tangle-web2c +tangle-web2c: tangle.p + $(web2c) tangle + echo timestamp >$@ + touch tangle.c tangle.h +## tangle.p is a special case, since it is needed to compile itself. We +## convert and compile the (distributed) tangleboot.p to make a tangle +## which we use to make the other programs. We depend on tangleboot, even +## though we might not use it. +EXTRA_DIST += tangle.web tangle.ch +tangle.p: tangleboot tangle.web tangle.ch + WEBINPUTS=.:$(srcdir) $(tangleboot) tangle tangle +tangle.web: + @echo "You seem to be missing tangle.web, perhaps because you" >&2 + @echo "didn't retrieve web.tar.gz, only web2c.tar.gz." >&2 + @echo "You need both." >&2 + @echo >&2 + @echo "web.tar.gz should be available from the" >&2 + @echo "same place that you got web2c.tar.gz." >&2 + @echo "In any case, you can get it from" >&2 + @echo "ftp://ftp.tug.org/tex/web.tar.gz." >&2 + false +DISTCLEANFILES += tangle.c tangle.h tangle.p tangle-web2c + +noinst_PROGRAMS += tangleboot +nodist_tangleboot_SOURCES = tangleboot.c tangleboot.h +tangleboot.c tangleboot.h: stamp-tangle $(web2c_programs) $(web2c_common) + $(web2c) tangleboot +## tangleboot.p is in the distribution +EXTRA_DIST += tangleboot.p +stamp-tangle: tangleboot.p + date >stamp-tangle +## This is not run unless tangle.web or tangle.ch is changed. +## Only try to run ./tangle if it actually exists, otherwise +## just touch tangleboot.p and build tangle. +tangleboot.p: tangle.web tangle.ch + if [ -r $(TANGLE) ] || [ -r $(TANGLE).exe ]; then \ + $(tangle) tangle tangle; \ + mv tangle.p tangleboot.p; \ + elif [ -r tangleboot.p ]; then \ + touch tangleboot.p; \ + else \ + cp $(srcdir)/tangleboot.p .; \ + fi + date >stamp-tangle + $(MAKE) $(AM_MAKEFLAGS) tangle +DISTCLEANFILES += stamp-tangle tangleboot.c tangleboot.h + +## Bootstrapping ctangle requires making it with itself. We use the opportunity +## to create an up-to-date ctangleboot as well. +bin_PROGRAMS += ctangle +nodist_ctangle_SOURCES = ctangle.c cweb.c +## ctangle.c is a special case, since it is needed to compile itself. +## We depend on ctangleboot, even though we might not use it. +EXTRA_DIST += cwebdir +## We install man/cweb.man, not cwebdir/cweb.1 +## nodist_man_MANS += cwebdir/cweb.1 +ctangle.c: ctangleboot cwebdir/ctangle.w cwebdir/ctang-w2c.ch + CWEBINPUTS=$(srcdir)/cwebdir $(ctangleboot) ctangle ctang-w2c +cweb.c: ctangleboot cwebdir/common.w cwebdir/comm-w2c.ch + CWEBINPUTS=$(srcdir)/cwebdir $(ctangleboot) common comm-w2c cweb.c +DISTCLEANFILES += ctangle.c cweb.c + +noinst_PROGRAMS += ctangleboot +nodist_ctangleboot_SOURCES = ctangleboot.c cwebboot.c +## ctangleboot.c and cwebboot.c are in the distribution +EXTRA_DIST += ctangleboot.c cwebboot.c +stamp-ctangle: ctangleboot.c cwebboot.c + date >stamp-ctangle +## This is not run unless one of the cwebdir/* files is changed. +## Only try to run ./ctangle if it actually exists, otherwise +## just touch ctangleboot.c and/or cwebboot.c and build ctangle. +ctangleboot.c: cwebdir/ctangle.w cwebdir/ctang-w2c.ch + if [ -r $(CTANGLE) ] || [ -r $(CTANGLE).exe ]; then \ + CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) ctangle ctang-w2c; \ + mv ctangle.c ctangleboot.c; \ + elif [ -r ctangleboot.c ]; then \ + touch ctangleboot.c; \ + else \ + cp $(srcdir)/ctangleboot.c .; \ + fi + date >stamp-ctangle + $(MAKE) $(AM_MAKEFLAGS) ctangle +cwebboot.c: cwebdir/common.w cwebdir/comm-w2c.ch + if [ -r $(CTANGLE) ] || [ -r $(CTANGLE).exe ]; then \ + CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) common comm-w2c cweb.c; \ + mv cweb.c cwebboot.c; \ + elif [ -r cwebboot.c ]; then \ + touch cwebboot.c; \ + else \ + cp $(srcdir)/cwebboot.c .; \ + fi + date >stamp-ctangle + $(MAKE) $(AM_MAKEFLAGS) ctangle +DISTCLEANFILES += stamp-ctangle + +## Tests + +dist_check_SCRIPTS += tangle.test + +TESTS += tangle.test + +DISTCLEANFILES += cftest.p + diff --git a/Build/source/texk/web2c/am/cweb.am b/Build/source/texk/web2c/am/cweb.am new file mode 100644 index 00000000000..7bdbde25a19 --- /dev/null +++ b/Build/source/texk/web2c/am/cweb.am @@ -0,0 +1,30 @@ +## texk/web2c/am/cweb.am: Makefile fragment for cweb programs (except ctangle). + +bin_PROGRAMS += ctie +nodist_ctie_SOURCES = ctie.c +EXTRA_DIST += ctiedir +nodist_man_MANS += ctiedir/ctie.1 +ctie.c: ctangle ctiedir/ctie.w ctiedir/ctie-k.ch + CWEBINPUTS=$(srcdir)/ctiedir $(ctangle) ctie.w ctie-k.ch +DISTCLEANFILES += ctie.c + +bin_PROGRAMS += cweave +nodist_cweave_SOURCES = cweave.c cweb.c +cweave.c: ctangle cwebdir/cweave.w cwebdir/cweav-w2c.ch + CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) cweave cweav-w2c +DISTCLEANFILES += cweave.c + +bin_PROGRAMS += tie +nodist_tie_SOURCES = tie.c +EXTRA_DIST += tiedir +nodist_man_MANS += tiedir/tie.1 +tie.c: ctangle tiedir/tie.w tiedir/tie-w2c.ch + CWEBINPUTS=$(srcdir)/tiedir $(ctangle) tie.w tie-w2c.ch +DISTCLEANFILES += tie.c + +## Tests + +TESTS += tiedir/tie.test + +DISTCLEANFILES += tie.outc tie.outm + diff --git a/Build/source/texk/web2c/am/texmf.am b/Build/source/texk/web2c/am/texmf.am new file mode 100644 index 00000000000..8d65e7bd065 --- /dev/null +++ b/Build/source/texk/web2c/am/texmf.am @@ -0,0 +1,108 @@ +## texk/web2c/am/texmf.am: Makefile fragment for TeX and MF. + +## Common for MF and TeX +EXTRA_DIST += \ + lib/mfmpi386.asm \ + lib/mfmpw32.c \ + lib/texmfmp.c \ + texmfmem.h \ + texmfmp-help.h \ + texmfmp.h + +## TeX +## +if TEX +bin_PROGRAMS += tex +endif TEX + +tex_CPPFLAGS = + +## With --enable-ipc, TeX may need to link with -lsocket. +tex_LDADD = $(LDADD) $(socketlibs) + +tex_c_h = texini.c tex0.c tex1.c tex2.c texcoerce.h texd.h +nodist_tex_SOURCES = $(tex_c_h) tex-pool.c texextra.c +$(tex_c_h): tex-web2c +tex-web2c: tex.p $(web2c_texmf) + $(web2c) tex + : $(synctex_convert_tex) + echo timestamp >$@ + touch $(tex_c_h) +texextra.c: lib/texmfmp.c texd.h + sed s/TEX-OR-MF-OR-MP/tex/ $(srcdir)/lib/texmfmp.c >$@ +tex.p tex.pool: tex-tangle +tex-tangle: $(TANGLE) tex.web tex-final.ch + $(tangle) tex.web tex-final.ch + echo timestamp >$@ + touch tex.p tex.pool +tex-pool.c: tex.pool $(makecpool) tmf-pool.h + $(makecpool) tex.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@ +## Generate tex-final.ch +tex-final.ch: $(TIE) $(tex_ch_srcs) + $(tie) -c $@ $(tex_ch_srcs) +tex_ch_srcs = \ + tex.web \ + tex.ch \ + $(tex_ch_synctex) \ + tex-binpool.ch +## +EXTRA_DIST += $(tex_ch_srcs) lib/texmfmp.c tmf-pool.h + +DISTCLEANFILES += $(nodist_tex_SOURCES) tex-final.ch tex-web2c \ + tex.p tex.pool tex-tangle + +## Metafont +## +if MF +bin_PROGRAMS += mf +endif MF + +nodist_mf_SOURCES = mfextra.c +mf_CPPFLAGS = $(X_CFLAGS) +mf_LDADD = libmf.a $(LDADD) $(windowlib) $(mf_x_libs) +if MFN +bin_PROGRAMS += mf-nowin +nodist_mf_nowin_SOURCES = mfextra.c +mf_nowin_CPPFLAGS = $(X_CFLAGS) -DMFNOWIN +mf_nowin_LDADD = libmf.a $(LDADD) $(windowlib) +endif MFN + +windowlib = window/libwindow.a +$(windowlib): mfd.h $(srcdir)/window/*.c + cd window && $(MAKE) $(AM_MAKEFLAGS) libwindow.a +## Make `#include <X11/...>' and `-lX...' work. +## This matches xdvik. +## wlibs is substituted by web2c's configure, LIBS by general configure +## routines, and the others by AC_PATH_XTRA. +## All the x_... and X_... variables will be empty if we aren't supporting X. +## Follow the library order used in X11R6 itself: +## -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present). +mf_x_libs = $(X_LIBS) $(x_tool_libs) $(X_PRE_LIBS) $(x_ext_lib) $(wlibs) $(X_EXTRA_LIBS) + +## mf and mf-nowin compile mfextra.c with different CPPFLAGS. +## Automake, however, does not support CPPFLAGS for individual source files. +## To avoid compiling everything twice, the common objects are in a library. +EXTRA_LIBRARIES += libmf.a +mf_c_h = mfini.c mf0.c mf1.c mfcoerce.h mfd.h +nodist_libmf_a_SOURCES = $(mf_c_h) mf-pool.c +libmf_a_CPPFLAGS = -DMETA_FONT +$(mf_c_h): mf-web2c +mf-web2c: mf.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed + $(web2c) mf + echo timestamp >$@ + touch $(mf_c_h) +EXTRA_DIST += mf.web mf-binpool.ch mf.ch mftalk.h lib/texmfmp.c tmf-pool.h +mfextra.c: lib/texmfmp.c mfd.h + sed s/TEX-OR-MF-OR-MP/mf/ $(srcdir)/lib/texmfmp.c >$@ +mf.p mf.pool: mf-tangle +mf-tangle: $(TANGLE) mf.web mf-final.ch + $(tangle) mf.web mf-final.ch + echo timestamp >$@ + touch mf.p mf.pool +mf-final.ch: $(TIE) mf.web mf.ch mf-binpool.ch + $(tie) -c $@ mf.web mf.ch mf-binpool.ch +mf-pool.c: mf.pool $(makecpool) tmf-pool.h + $(makecpool) mf.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@ +DISTCLEANFILES += $(nodist_libmf_a_SOURCES) mfextra.c mf-final.ch mf-web2c \ + mf.p mf.pool mf-tangle + diff --git a/Build/source/texk/web2c/am/web.am b/Build/source/texk/web2c/am/web.am new file mode 100644 index 00000000000..951e4fded6c --- /dev/null +++ b/Build/source/texk/web2c/am/web.am @@ -0,0 +1,166 @@ +## texk/web2c/am/web.am: Makefile fragment for normal web programs (except tangle). + +web_programs = bibtex dvicopy dvitomp dvitype gftodvi gftopk gftype mft \ + patgen pktogf pktype pltotf pooltype tftopl vftovp vptovf weave + +if WEB +bin_PROGRAMS += $(web_programs) +endif WEB + +EXTRA_DIST += $(web_programs:=.web) $(web_programs:=.ch) +DISTCLEANFILES += $(web_programs:=.c) $(web_programs:=.h) \ + $(web_programs:=.p) $(web_programs:=-web2c) + +nodist_bibtex_SOURCES = bibtex.c bibtex.h +bibtex.c bibtex.h: bibtex-web2c +bibtex-web2c: $(web2c_common) $(web2c_programs) web2c/cvtbib.sed bibtex.p + $(web2c) bibtex + echo timestamp >$@ + touch bibtex.c bibtex.h +bibtex.p: tangle bibtex.web bibtex.ch + $(tangle) bibtex bibtex + +nodist_dvicopy_SOURCES = dvicopy.c dvicopy.h +dvicopy.c dvicopy.h: dvicopy-web2c +dvicopy-web2c: $(web2c_common) $(web2c_programs) dvicopy.p + $(web2c) dvicopy + echo timestamp >$@ + touch dvicopy.c dvicopy.h +dvicopy.p: tangle dvicopy.web dvicopy.ch + $(tangle) dvicopy dvicopy + +nodist_dvitomp_SOURCES = dvitomp.c dvitomp.h +dvitomp.c dvitomp.h: dvitomp-web2c +dvitomp-web2c: $(web2c_common) $(web2c_programs) dvitomp.p + $(web2c) dvitomp + echo timestamp >$@ + touch dvitomp.c dvitomp.h +dvitomp.p: tangle dvitomp.web dvitomp.ch + $(tangle) dvitomp dvitomp + +nodist_dvitype_SOURCES = dvitype.c dvitype.h +dvitype.c dvitype.h: dvitype-web2c +dvitype-web2c: $(web2c_common) $(web2c_programs) dvitype.p + $(web2c) dvitype + echo timestamp >$@ + touch dvitype.c dvitype.h +dvitype.p: tangle dvitype.web dvitype.ch + $(tangle) dvitype dvitype + +nodist_gftodvi_SOURCES = gftodvi.c gftodvi.h +gftodvi.c gftodvi.h: gftodvi-web2c +gftodvi-web2c: $(web2c_common) $(web2c_programs) gftodvi.p + $(web2c) gftodvi + echo timestamp >$@ + touch gftodvi.c gftodvi.h +gftodvi.p: tangle gftodvi.web gftodvi.ch + $(tangle) gftodvi gftodvi +gftodvi_SOURCES = gftodmem.h + +nodist_gftopk_SOURCES = gftopk.c gftopk.h +gftopk.c gftopk.h: gftopk-web2c +gftopk-web2c: $(web2c_common) $(web2c_programs) gftopk.p + $(web2c) gftopk + echo timestamp >$@ + touch gftopk.c gftopk.h +gftopk.p: tangle gftopk.web gftopk.ch + $(tangle) gftopk gftopk + +nodist_gftype_SOURCES = gftype.c gftype.h +gftype.c gftype.h: gftype-web2c +gftype-web2c: $(web2c_common) $(web2c_programs) gftype.p + $(web2c) gftype + echo timestamp >$@ + touch gftype.c gftype.h +gftype.p: tangle gftype.web gftype.ch + $(tangle) gftype gftype + +nodist_mft_SOURCES = mft.c mft.h +mft.c mft.h: mft-web2c +mft-web2c: $(web2c_common) $(web2c_programs) mft.p + $(web2c) mft + echo timestamp >$@ + touch mft.c mft.h +mft.p: tangle mft.web mft.ch + $(tangle) mft mft + +nodist_patgen_SOURCES = patgen.c patgen.h +patgen.c patgen.h: patgen-web2c +patgen-web2c: $(web2c_common) $(web2c_programs) patgen.p + $(web2c) patgen + echo timestamp >$@ + touch patgen.c patgen.h +patgen.p: tangle patgen.web patgen.ch + $(tangle) patgen patgen + +nodist_pktogf_SOURCES = pktogf.c pktogf.h +pktogf.c pktogf.h: pktogf-web2c +pktogf-web2c: $(web2c_common) $(web2c_programs) pktogf.p + $(web2c) pktogf + echo timestamp >$@ + touch pktogf.c pktogf.h +pktogf.p: tangle pktogf.web pktogf.ch + $(tangle) pktogf pktogf + +nodist_pktype_SOURCES = pktype.c pktype.h +pktype.c pktype.h: pktype-web2c +pktype-web2c: $(web2c_common) $(web2c_programs) pktype.p + $(web2c) pktype + echo timestamp >$@ + touch pktype.c pktype.h +pktype.p: tangle pktype.web pktype.ch + $(tangle) pktype pktype + +nodist_pltotf_SOURCES = pltotf.c pltotf.h +pltotf.c pltotf.h: pltotf-web2c +pltotf-web2c: $(web2c_common) $(web2c_programs) pltotf.p + $(web2c) pltotf + echo timestamp >$@ + touch pltotf.c pltotf.h +pltotf.p: tangle pltotf.web pltotf.ch + $(tangle) pltotf pltotf + +nodist_pooltype_SOURCES = pooltype.c pooltype.h +pooltype.c pooltype.h: pooltype-web2c +pooltype-web2c: $(web2c_common) $(web2c_programs) pooltype.p + $(web2c) pooltype + echo timestamp >$@ + touch pooltype.c pooltype.h +pooltype.p: tangle pooltype.web pooltype.ch + $(tangle) pooltype pooltype + +nodist_tftopl_SOURCES = tftopl.c tftopl.h +tftopl.c tftopl.h: tftopl-web2c +tftopl-web2c: $(web2c_common) $(web2c_programs) tftopl.p + $(web2c) tftopl + echo timestamp >$@ + touch tftopl.c tftopl.h +tftopl.p: tangle tftopl.web tftopl.ch + $(tangle) tftopl tftopl + +nodist_vftovp_SOURCES = vftovp.c vftovp.h +vftovp.c vftovp.h: vftovp-web2c +vftovp-web2c: $(web2c_common) $(web2c_programs) vftovp.p + $(web2c) vftovp + echo timestamp >$@ + touch vftovp.c vftovp.h +vftovp.p: tangle vftovp.web vftovp.ch + $(tangle) vftovp vftovp + +nodist_vptovf_SOURCES = vptovf.c vptovf.h +vptovf.c vptovf.h: vptovf-web2c +vptovf-web2c: $(web2c_common) $(web2c_programs) vptovf.p + $(web2c) vptovf + echo timestamp >$@ + touch vptovf.c vptovf.h +vptovf.p: tangle vptovf.web vptovf.ch + $(tangle) vptovf vptovf + +nodist_weave_SOURCES = weave.c weave.h +weave.c weave.h: weave-web2c +weave-web2c: $(web2c_common) $(web2c_programs) weave.p + $(web2c) weave + echo timestamp >$@ + touch weave.c weave.h +weave.p: tangle weave.web weave.ch + $(tangle) weave weave |