diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-07-06 09:40:06 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2013-07-06 09:40:06 +0000 |
commit | 832b5ce3848de5ca76c493570fc066f450ec8011 (patch) | |
tree | 52b629b6cd51b3769658ae55dc1f511c0bcac222 /Build/source/am/rebuild.am | |
parent | 7d7828afcc587d0e0889fb0a62cdfe25c53cb9d2 (diff) |
build system: Move Makefile fragments from libs/am/ and texk/am/ to top-level/am.
git-svn-id: svn://tug.org/texlive/trunk@31117 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/am/rebuild.am')
-rw-r--r-- | Build/source/am/rebuild.am | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Build/source/am/rebuild.am b/Build/source/am/rebuild.am new file mode 100644 index 00000000000..9b53015b192 --- /dev/null +++ b/Build/source/am/rebuild.am @@ -0,0 +1,33 @@ +## 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: + echo timestamp >$@ + +.PHONY: rebuild +rebuild: $(rebuild_prereq) + @dry=; for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=*|--*);; \ + *n*) dry=:;; \ + esac; \ + done; \ + $$dry rm -f rebuild.stamp; \ + $$dry trap 'rm -rf rebuild.lock' 1 2 13 15; \ + if $$dry mkdir rebuild.lock 2>/dev/null; then \ + $(MAKE) $(AM_MAKEFLAGS) $(rebuild_target) 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 + +CLEANFILES += rebuild.stamp + |