diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/am | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/am')
-rw-r--r-- | Build/source/am/ChangeLog | 36 | ||||
-rw-r--r-- | Build/source/am/README | 7 | ||||
-rw-r--r-- | Build/source/am/bin_links.am | 39 | ||||
-rw-r--r-- | Build/source/am/dist_hook.am | 16 | ||||
-rw-r--r-- | Build/source/am/hdr_links.am | 20 | ||||
-rw-r--r-- | Build/source/am/man.am | 52 | ||||
-rw-r--r-- | Build/source/am/man1_links.am | 25 | ||||
-rw-r--r-- | Build/source/am/rebuild.am | 34 | ||||
-rw-r--r-- | Build/source/am/reconfig.am | 25 | ||||
-rw-r--r-- | Build/source/am/recurse.am | 58 | ||||
-rw-r--r-- | Build/source/am/script_links.am | 87 |
11 files changed, 399 insertions, 0 deletions
diff --git a/Build/source/am/ChangeLog b/Build/source/am/ChangeLog new file mode 100644 index 00000000000..cf4170e688d --- /dev/null +++ b/Build/source/am/ChangeLog @@ -0,0 +1,36 @@ +2017-02-17 Karl Berry <karl@freefriends.org> + + * bin_links.am, + * recurse.am: consistently omit $Id$ from generated Makefile.in, + but do include comments. + +2017-02-16 Karl Berry <karl@tug.org> + + * bin_links.am: $(MKDIR_P) $(DESTDIR)$(bindir) to be sure, + since this can end up being called first with --disable-all-pkgs. + +2015-02-16 Peter Breitenlohner <peb@mppmu.mpg.de> + + * dist_hook.am (new): Makefile fragment for dist-hook target. + * Makefile.am: Use the fragment dist_hook.am. + +2014-11-17 Karl Berry <karl@tug.org> + + * script_links.am: Use w32_wrapper or w64_wrapper. + +2013-07-16 Peter Breitenlohner <peb@mppmu.mpg.de> + + * rebuild.am: Avoid still more 'parallel make' problems. + +2013-07-15 Peter Breitenlohner <peb@mppmu.mpg.de> + + * rebuild.am: Avoid more 'parallel make' problems. + +2013-07-06 Peter Breitenlohner <peb@mppmu.mpg.de> + + * *.am: Moved Makefile fragments from libs/ and tekk/. + * rebuild.am: New Makefile fragment to rebuild a library. + * reconfig.am: New Makefile fragment to reconfigure. + * recurse.am: New Makefile fragment to recurse into subdirs. + +(This file public domain.) diff --git a/Build/source/am/README b/Build/source/am/README new file mode 100644 index 00000000000..424899d0ab6 --- /dev/null +++ b/Build/source/am/README @@ -0,0 +1,7 @@ +$Id$ +Public domain. Originally written 2017 by Karl Berry. + +This top-level am/ directory contains fragments which are ultimately used +in Makefile.am files by automake (a.k.a. the top-level reautoconf). + +See also the sibling top-level m4/ directory. diff --git a/Build/source/am/bin_links.am b/Build/source/am/bin_links.am new file mode 100644 index 00000000000..2ff85d0cbe1 --- /dev/null +++ b/Build/source/am/bin_links.am @@ -0,0 +1,39 @@ +## $Id$ +# am/bin_links.am: Makefile fragment for bindir links. +# +# Copyright 2017-2020 Karl Berry <tex-live@tug.org> +# Copyright 2011-2013 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. +# +# requires conditional WIN32 +# requires $(bin_links) +# Symlinks within $(bindir): FILE:LINK indicates LINK->FILE +# for binaries and scripts use, e.g., +# binprog$(EXEEXT):foo +# script:bar +# respectively, such that the links created on cygwin are +# 'foo->binprog.exe' and 'bar->script'. + +.PHONY: install-bin-links uninstall-bin-links + +install-bin-links: +if !WIN32 + $(MKDIR_P) $(DESTDIR)$(bindir) + @cd $(DESTDIR)$(bindir) && \ + for s in $(bin_links); do \ + link=`echo $$s | sed 's,.*:,,'`; \ + file=`echo $$s | sed 's,:.*,,'`; \ + rm -f $$link; \ + echo "creating link '$$link' -> '$$file'"; \ + $(LN_S) $$file $$link || exit 1; \ + done +endif !WIN32 + +uninstall-bin-links: +if !WIN32 + @for s in $(bin_links); do \ + link=`echo $$s | sed 's,.*:,,'`; \ + rm -f $(DESTDIR)$(bindir)/$$link; \ + done +endif !WIN32 + diff --git a/Build/source/am/dist_hook.am b/Build/source/am/dist_hook.am new file mode 100644 index 00000000000..96b546e782d --- /dev/null +++ b/Build/source/am/dist_hook.am @@ -0,0 +1,16 @@ +## am/dist_hook.am: Makefile fragment for the dist-hook target. +## +## Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +dist-hook: + cd "$(distdir)" && rm -rf $(NEVER_DIST) + +NEVER_DIST = `find . $(NEVER_NAMES)` +## Names not to be distributed +NEVER_NAMES = -name .svn +## Additional names for subdir-objects +NEVER_NAMES_SUB = -o -name .deps -o -name .dirstamp -o -name '*.$(OBJEXT)' +## Additional names for libtool +NEVER_NAMES_LT = -o -name .libs -o -name '*.lo' + diff --git a/Build/source/am/hdr_links.am b/Build/source/am/hdr_links.am new file mode 100644 index 00000000000..4985c32ca2a --- /dev/null +++ b/Build/source/am/hdr_links.am @@ -0,0 +1,20 @@ +## am/hdr_links.am: Makefile fragment for header links. +## +## Copyright (C) 2012-2013 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## requires $(hdr_links), `install' headers in the build tree. +all-local: + @for file in $(hdr_links); do \ + test -f $$file || continue; \ + inst=`echo $$file | sed -e 's/^.*\///'`; \ + test -f $$inst || { \ + rm -f $$inst; \ + if $(AM_V_P); then echo "$(LN_S) $$file $$inst"; \ + else echo " INST $$inst"; fi; \ + $(LN_S) $$file $$inst; } || exit 1; \ + done + +distclean-local: + rm -f *.h + diff --git a/Build/source/am/man.am b/Build/source/am/man.am new file mode 100644 index 00000000000..bd598ac75a7 --- /dev/null +++ b/Build/source/am/man.am @@ -0,0 +1,52 @@ +## am/man.am: Makefile fragment for kpathsea and web2c manual pages. +## +## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## requires $(man_sources) +## requires $(KPATHSEA_PATHS_H) giving the directory of kpathsea/paths.h + +SUFFIXES = .1 .man .ps .dvi + +.man.1: + $(AM_V_GEN)sed -f sedscript $< >$@ +man_files = $(man_sources:.man=.1) +$(man_files): sedscript + +nodist_man1_MANS = $(man_files) + +# At present, all but VERSION should be unused. +sedscript: $(KPATHSEA_PATHS_H)/kpathsea/paths.h + $(AM_V_GEN)( \ + sed -n -e '/^#define/s/#define[ ][ ]*\([A-Z_a-z][A-Z_a-z]*\)[ ][ ]*\(.*\)/s%@\1@%\2%/p' \ + $(KPATHSEA_PATHS_H)/kpathsea/paths.h \ + | sed -e 's/"//g' -e 's/[ ]*\/\*[^*]*\*\///g'; \ + echo 's%@VER''SION@%$(VERSION)%'; \ + echo 's%@BINDIR@%$(bindir)%'; \ + echo 's%@INFODIR@%$(infodir)%'; \ + echo 's%@TEXINPUTDIR@%$(texinputdir)%'; \ + echo 's%@MFINPUTDIR@%$(mfinputdir)%'; \ + echo 's%@MPINPUTDIR@%$(mpinputdir)%'; \ + echo 's%@FONTDIR@%$(fontdir)%'; \ + echo 's%@FMTDIR@%$(fmtdir)%'; \ + echo 's%@BASEDIR@%$(basedir)%'; \ + echo 's%@MEMDIR@%$(memdir)%'; \ + echo 's%@TEXPOOLDIR@%$(texpooldir)%'; \ + echo 's%@MFPOOLDIR@%$(mfpooldir)%'; \ + echo 's%@MPPOOLDIR@%$(mppooldir)%'; \ + echo 's%@FONTMAPDIR@%$(dvipsdir)%'; \ + echo 's%@LOCALMODES@%$(localmodes)%') >sedscript + +DITROFF = groff + +.1.dvi: + $(DITROFF) -Tdvi -man $< >$@ +DVIS = $(man_files:.1=.dvi) + +.1.ps: + $(DITROFF) -Tps -man $< >$@ +PSS = $(man_files:.1=.ps) + +DISTCLEANFILES = sedscript $(man_files) $(DVIS) $(PSS) + +## end of texk/am/man.am diff --git a/Build/source/am/man1_links.am b/Build/source/am/man1_links.am new file mode 100644 index 00000000000..d08b82591ce --- /dev/null +++ b/Build/source/am/man1_links.am @@ -0,0 +1,25 @@ +## am/man1_links.am: Makefile fragment for manual page links. +## +## Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## requires $(man1_links) +## Symlinks within $(man1dir): FILE:LINK indicates LINK.1->FILE.1 +.PHONY: install-man1-links uninstall-man1-links + +install-man1-links: + @cd $(DESTDIR)$(man1dir) && \ + for s in $(man1_links); do \ + link=`echo $$s | sed 's,.*:,,'`; \ + file=`echo $$s | sed 's,:.*,,'`; \ + rm -f $$link.1; \ + echo "creating link '$$link.1' -> '$$file.1'"; \ + echo ".so man1/$$file.1" >$$link.1; \ + done + +uninstall-man1-links: + @for s in $(man1_links); do \ + link=`echo $$s | sed 's,.*:,,'`; \ + rm -f $(DESTDIR)$(man1dir)/$$link.1; \ + done + diff --git a/Build/source/am/rebuild.am b/Build/source/am/rebuild.am new file mode 100644 index 00000000000..81f7d33b623 --- /dev/null +++ b/Build/source/am/rebuild.am @@ -0,0 +1,34 @@ +## am/rebuild.am: Makefile fragment to rebuild a library. +## +## Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## requires $(rebuild_prereq), $(rebuild_target), and CLEANFILES. +## +## Serialize concurrent rebuild attempts +## Compare Automake manual (info Automake) 27.9: Multiple Outputs +## +rebuild.stamp: $(rebuild_target) + echo timestamp >$@ + +.PHONY: rebuild +rebuild: $(rebuild_prereq) + @dry=; for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=*|--*);; \ + *n*) dry=:;; \ + esac; \ + done; \ + if test -f rebuild.stamp; then :; else \ + $$dry trap 'rm -rf rebuild.lock' 1 2 13 15; \ + if $$dry mkdir rebuild.lock 2>/dev/null; then \ + $(MAKE) $(AM_MAKEFLAGS) rebuild.stamp; \ + $$dry rmdir rebuild.lock; \ + else \ + while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \ + fi; \ + $$dry test -f rebuild.stamp; exit $$?; \ + fi + +CLEANFILES += rebuild.stamp + diff --git a/Build/source/am/reconfig.am b/Build/source/am/reconfig.am new file mode 100644 index 00000000000..55e77fcbf27 --- /dev/null +++ b/Build/source/am/reconfig.am @@ -0,0 +1,25 @@ +## am/reconfig.am: Makefile fragment to reconfigure a directory. +## +## Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## requires $(reconfig_prereq) and DISTCLEANFILES. +## +## Serialize concurrent reconfig attempts +## Compare Automake manual (info Automake) 27.9: Multiple Outputs +## +config.force: $(reconfig_prereq) + @if test -f $@; then :; else \ + trap 'rm -rf reconfig.lock' 1 2 13 15; \ + if mkdir reconfig.lock 2>/dev/null; then \ + echo timestamp >$@; \ + $(SHELL) ./config.status --recheck; \ + rmdir reconfig.lock; \ + else \ + while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \ + test -f $@; \ + fi; \ + fi + +DISTCLEANFILES += config.force + diff --git a/Build/source/am/recurse.am b/Build/source/am/recurse.am new file mode 100644 index 00000000000..7bfe320c99d --- /dev/null +++ b/Build/source/am/recurse.am @@ -0,0 +1,58 @@ +## $Id$ +# am/recurse.am: Makefile fragment to configure and build subdirs. +# +# Copyright 2017-2020 Karl Berry <tex-live@tug.org> +# Copyright 2013 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. +# +# Requires $(recurse_this) and $(recurse_top). +# Uses CONF_SUBDIRS and MAKE_SUBDIRS (set by kpse-setup.m4). +# +# For subdirs not required for the current set of configure options +# we append '--disable-build' so they can skip tests that would +# fail because, e.g., some required libraries were not built. +# (By manually testing $enable_build in configure, e.g., dvisvgm/configure.) +# +# Code inspired by automake's way to handle recursive targets. +# +cf_silent = $(cf_silent_@AM_V@) +cf_silent_ = $(cf_silent_@AM_DEFAULT_V@) +cf_silent_0 = --silent +cf_silent_1 = + +CONFIG_AUX = $(recurse_top)subsubdir-conf.cmd + +all-local: recurse + +.PHONY: recurse +recurse: $(CONFIG_AUX) + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + list='$(CONF_SUBDIRS)'; for one_dir in $$list; do \ + if test ! -f $$one_dir/Makefile; then \ + test -d $$one_dir || $(MKDIR_P) $$one_dir; \ + cmd=`cat $(CONFIG_AUX) | sed "s,auxdir/auxsub,$(recurse_this)$$one_dir,g"`; \ + case " $(MAKE_SUBDIRS) " in \ + *" $$one_dir "*) skip=;; \ + *) skip=' --disable-build';; \ + esac; \ + (cd $$one_dir && echo "=== configuring in $$one_dir (`pwd`)" && \ + if $(AM_V_P); then echo "make: running $(SHELL) $$cmd$$skip"; fi && \ + CONFIG_SHELL=$(SHELL) && export CONFIG_SHELL && \ + eval $(SHELL) $$cmd$$skip $(cf_silent) || \ + { echo "=== configuring in $$one_dir failed"; exit 1; }) && \ + if test "x$$skip" = x; then \ + echo "Making all in $$one_dir" && \ + (cd $$one_dir && $(MAKE) $(AM_MAKEFLAGS) all); \ + fi || eval $$failcom; \ + fi; \ + done; test -z "$$fail" + +$(CONFIG_AUX): + @echo "configure in $(recurse_top)auxdir/auxsub failed to create the file $@" + exit 1 diff --git a/Build/source/am/script_links.am b/Build/source/am/script_links.am new file mode 100644 index 00000000000..e12e09edc9c --- /dev/null +++ b/Build/source/am/script_links.am @@ -0,0 +1,87 @@ +## am/script_links.am: Makefile fragment for lua/perl/shell script links. +## +## Copyright (C) 2011-2014 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. +## +## Install/uninstall 'linked scripts' or win32 wrappers: +## Add the prerequisite uninstall-links to uninstall-hook and one or +## or more of install-{perl,shell,sh}-scripts to install-data-hook +## +## The sh_scripts are special because they have no corresponding +## win32 wrapper, whereas shell_scripts do have such wrappers. +## +## requires conditionals WIN32 and WIN32_WRAP +## requires $(scriptsdir): e.g., texmf/scripts/chktex +## appends to $(nodist_bin_SCRIPTS) and $(EXTRA_DIST) +## +## install-lua-scripts requires $(lua_scripts), e.g., pmx2pdf +## install-perl-scripts requires $(perl_scripts), e.g., deweb +## install-shell-scripts requires $(shell_scripts), e.g. htlatex +## install-sh-scripts requires $(sh_scripts), e.g. getafm +## +.PHONY: install-lua-links install-perl-links install-shell-links install-sh-links \ + install-links uninstall-links + +all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts) + +if WIN32 +if WIN32_WRAP +## We treat the WIN32 wrappers as SCRIPTS to avoid automatic build rules +wrappers = $(all_scripts:=.exe) +nodist_bin_SCRIPTS += $(wrappers) +runscript = $(top_srcdir)/../../texk/texlive/$(WIN_WRAPPER)/runscript.exe +$(wrappers): $(runscript) + $(AM_V_GEN)$(LN_S) $(runscript) $@ +endif WIN32_WRAP +endif WIN32 + +install-lua-links: +if !WIN32 + $(MAKE) $(AM_MAKEFLAGS) TYPE=lua EXT=lua install-links +endif !WIN32 + +install-perl-links: +if !WIN32 + $(MAKE) $(AM_MAKEFLAGS) TYPE=perl EXT=pl install-links +endif !WIN32 + +install-shell-links: +if !WIN32 + $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links +endif !WIN32 + +install-sh-links: +if !WIN32 + $(MAKE) $(AM_MAKEFLAGS) TYPE=sh EXT=sh install-links +endif !WIN32 + +EXTRA_DIST += $(top_builddir)/../../build-aux/relpath + +# We support native builds, multiplatform or not, as well as distro builds. +install-links: + @relpath="$(top_srcdir)/../../build-aux/relpath"; \ + test -r $$relpath || { \ + echo 'script_links.am:install-links: could not find relpath script'; \ + exit 1; \ + }; \ + REL=`$(SHELL) $$relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \ + if test -z "$$REL"; then \ + echo 'script_links.am:install_links: unable to compute relative path for linked $(TYPE) scripts' >&2; \ + exit 1; \ + fi; \ + cd $(DESTDIR)$(bindir) && \ + for f in $($(TYPE)_scripts); do \ + rm -f $$f; \ + if $(AM_V_P); then echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \ + else echo " LINK $$f"; fi; \ + $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \ + done + +uninstall-links: +if !WIN32 + @for f in $(all_scripts) $(sh_scripts); do \ + echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done +endif !WIN32 + |