How to make all targets in the Makefile depend on a specific file?
1
vote
1
answer
725
views
Here in
make
I want to make all targets in the whole Makefile
depend on a specific file. (That specific file is Makefile
in fact, because that's where I have all my formulas. But that's beside the point.)
Here we see I have, like some nincompoop, painstakingly added it to each target,
$ grep Y Makefile
Y = Makefile
h32540000_zong.csv: $Y; $L | perl -pwle 'BEGIN{$$b=3; $$start=5;};$w; s/@\s+/\n/g;' > $@
h32540000_heng.csv: $Y; $L | perl -pwle \
h32540001_zong.csv: $Y; $L | perl -pwle 'BEGIN{$$start=8;};$w;$(\
h32540001_wall_zong.csv: $Y; $L | perl -wple \
h32540001_heng.csv: $Y; $L | perl -pwle \
h32540001_wall_heng.csv: $Y; $L | perl -pwle \
Is there some smarter way?
Is there some
.ALL_TARGETS: Makefile #or,
%: Makefile
etc. notation I could use to achieve the same effect?
Or maybe just have it operate on all targets that match a specific pattern?
I was thinking of using the %
notation, but alas that would reassign the command list of how to make each target...
Asked by Dan Jacobson
(560 rep)
Nov 10, 2024, 09:51 AM
Last activity: Nov 11, 2024, 04:30 AM
Last activity: Nov 11, 2024, 04:30 AM