~mdw
/
chopwood
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: Bring up to code.
[chopwood]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
3ccd4e5
..
745d277
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-77,21
+77,33
@@
all::
CLEANFILES = *.pyc
###--------------------------------------------------------------------------
CLEANFILES = *.pyc
###--------------------------------------------------------------------------
+### Additional machinery.
+
+V = 0
+
+V_AT = $(V_AT_$V)
+V_AT_0 = @
+
+v_tag = $(call v_tag_$V,$1)
+v_tag_0 = @printf " %-8s %s\n" '$1' '$@';
+
+###--------------------------------------------------------------------------
### The automatically-generated installation module.
TARGETS += auto.py auto-$(VERSION).py
auto-$(VERSION).py: Makefile get-version $(SOURCES) $(wildcard RELEASE)
### The automatically-generated installation module.
TARGETS += auto.py auto-$(VERSION).py
auto-$(VERSION).py: Makefile get-version $(SOURCES) $(wildcard RELEASE)
+ $(call v_tag,GEN)\
{ echo "### -*-python-*-"; \
echo "PACKAGE = '$(PACKAGE)'"; \
echo "VERSION = '$(VERSION)'"; \
echo "HOME = '$$(pwd)'"; \
{ echo "### -*-python-*-"; \
echo "PACKAGE = '$(PACKAGE)'"; \
echo "VERSION = '$(VERSION)'"; \
echo "HOME = '$$(pwd)'"; \
- } >$@.new
- mv $@.new $@
+ } >$@.new && mv $@.new $@
auto.py: auto-$(VERSION).py
auto.py: auto-$(VERSION).py
+ $(call v_tag,SYMLINK)\
rm -f auto.py.new && ln -s $^ auto.py.new && mv auto.py.new auto.py
rm -f auto.py.new && ln -s $^ auto.py.new && mv auto.py.new auto.py
- for i in auto-*.py; do \
+
$(V_AT)
for i in auto-*.py; do \
case $$i in auto-$(VERSION).py) ;; *) rm -f $$i ;; esac; \
done
case $$i in auto-$(VERSION).py) ;; *) rm -f $$i ;; esac; \
done
@@
-101,10
+113,10
@@
auto.py: auto-$(VERSION).py
TARGETS += static/stamp
static/stamp: $(SOURCES) auto.py
TARGETS += static/stamp
static/stamp: $(SOURCES) auto.py
- rm -rf static.new
- ./chpwd static static.new
- touch static.new/stamp
- rm -rf static && mv static.new static
+
$(V_AT)
rm -rf static.new
+
$(call v_tag,GEN)
./chpwd static static.new
+
$(V_AT)
touch static.new/stamp
+
$(V_AT)
rm -rf static && mv static.new static
clean::; rm -rf static
clean::; rm -rf static