chiark
/
gitweb
/
~mdw
/
chopwood
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
efe9641
)
Makefile: Bring up to code.
1.2.0
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 16 May 2020 09:53:01 +0000
(10:53 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 16 May 2020 10:05:11 +0000
(11:05 +0100)
Makefile
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index 3ccd4e592be2bb2087ce7e1d4b5937768f3e521f..745d2776ac09d4fe16718c1394f01d2acf0e3097 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-76,22
+76,34
@@
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