beta-0.89.2
[luatex.git] / source / am / reconfig.am
blob55e77fcbf27b6f3d14b37e685945fd34aa02a8cc
1 ## am/reconfig.am: Makefile fragment to reconfigure a directory.
2 ##
3 ## Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
5 ##
6 ## requires $(reconfig_prereq) and DISTCLEANFILES.
7 ##
8 ## Serialize concurrent reconfig attempts
9 ## Compare Automake manual (info Automake) 27.9: Multiple Outputs
11 config.force: $(reconfig_prereq)
12         @if test -f $@; then :; else \
13           trap 'rm -rf reconfig.lock' 1 2 13 15; \
14           if mkdir reconfig.lock 2>/dev/null; then \
15             echo timestamp >$@; \
16             $(SHELL) ./config.status --recheck; \
17             rmdir reconfig.lock; \
18           else \
19             while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \
20             test -f $@; \
21           fi; \
22         fi
24 DISTCLEANFILES += config.force