| 1 |
## am/reconfig.am: Makefile fragment to reconfigure a directory. |
| 2 |
## |
| 3 |
## Copyright (C) 2013 Peter Breitenlohner <[email protected]> |
| 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 |
| 10 |
## |
| 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 |
| 23 |
|
| 24 |
DISTCLEANFILES += config.force |
| 25 |
|