~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eb174df
)
Makefile: Attach hooks to the main rules, for custom post-processing.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 27 Apr 2018 11:42:59 +0000
(12:42 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 27 Apr 2018 11:48:11 +0000
(12:48 +0100)
Makefile
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index
21352b8
..
8a2de99
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-293,6
+293,7
@@
$(addprefix $(HOME)/, $(subst %,\%,$(DOTLINKS))): $(HOME)/%: \
rm -f $@.new && \
ln -s $(call dotfile-source,$*) $@.new && \
mv $@.new $@
rm -f $@.new && \
ln -s $(call dotfile-source,$*) $@.new && \
mv $@.new $@
+ $(dotfile-hook/$*)
## Hack with the C preprocessor.
all:: $(addprefix $(HOME)/, $(DOTCPP))
## Hack with the C preprocessor.
all:: $(addprefix $(HOME)/, $(DOTCPP))
@@
-302,6
+303,7
@@
$(addprefix $(HOME)/, $(subst %,\%,$(DOTCPP))): $(HOME)/%: \
rm -f $@.new && \
cpp -P -o$@.new $($*_DEFS) $< && \
mv $@.new $@
rm -f $@.new && \
cpp -P -o$@.new $($*_DEFS) $< && \
mv $@.new $@
+ $(dotfile-hook/$*)
## Hack by making simple substitutions.
substvar = -e $(call quote,s
\a
@$1@
\a
$2
\a
g)
## Hack by making simple substitutions.
substvar = -e $(call quote,s
\a
@$1@
\a
$2
\a
g)
@@
-317,6
+319,7
@@
$(relax)### generated by $(HERE)/Makefile; do not edit!" \
$(SUBSTS) $($*_SUBSTS) \
$(call dotfile-source,$*,.in) >$@.new && \
mv $@.new $@
$(SUBSTS) $($*_SUBSTS) \
$(call dotfile-source,$*,.in) >$@.new && \
mv $@.new $@
+ $(dotfile-hook/$*)
###--------------------------------------------------------------------------
### Processing script links.
###--------------------------------------------------------------------------
### Processing script links.
@@
-331,6
+334,7
@@
$(addprefix $(HOME)/bin/, $(SCRIPTLINKS)): $(HOME)/bin/%: \
rm -f $@.new && \
ln -s $(call script-source,$*) $@.new && \
mv $@.new $@
rm -f $@.new && \
ln -s $(call script-source,$*) $@.new && \
mv $@.new $@
+ $(script-hook/$*)
all:: $(addprefix $(HOME)/bin/, $(SCRIPTLINKS))
all:: $(addprefix $(HOME)/bin/, $(SCRIPTLINKS))
@@
-387,6
+391,7
@@
$(foreach p, $(PACKAGES), $(call pkg-stamp,$p,install)): \
$(call v_tag,INSTALL)cd $(dir $@) && \
$(MAKE) $($*_MAKEFLAGS) install >>buildlog 2>&1 && \
touch install-stamp
$(call v_tag,INSTALL)cd $(dir $@) && \
$(MAKE) $($*_MAKEFLAGS) install >>buildlog 2>&1 && \
touch install-stamp
+ $(package-hook/$*)
all:: $(foreach p, $(PACKAGES), $(DEP_$p))
$(foreach p, $(PACKAGES), $(eval _pkg.$p: $(call pkg-stamp,$p,install)))
all:: $(foreach p, $(PACKAGES), $(DEP_$p))
$(foreach p, $(PACKAGES), $(eval _pkg.$p: $(call pkg-stamp,$p,install)))