Skip to content

Commit fb7be92

Browse files
committed
Mark print-% target as phony.
.PHONY does not take patterns (such as print-%) as prerequisites. Have print-% depend on FORCE and mark FORCE as phony. $ # on master $ make print-host host=x86_64-pc-linux-gnu $ touch print-host $ make print-host make: 'print-host' is up to date. $ $ git co mark_print_as_phony Switched to branch 'mark_print_as_phony' $ make print-host host=x86_64-pc-linux-gnu $ touch FORCE $ make print-host host=x86_64-pc-linux-gnu
1 parent e3d644a commit fb7be92

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
# Pattern rule to print variables, e.g. make print-top_srcdir
6-
print-%:
6+
print-%: FORCE
77
@echo '$*'='$($*)'
88

99
ACLOCAL_AMFLAGS = -I build-aux/m4

depends/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.NOTPARALLEL :
22

33
# Pattern rule to print variables, e.g. make print-top_srcdir
4-
print-%:
4+
print-%: FORCE
55
@echo '$*'='$($*)'
66

77
# When invoking a sub-make, keep only the command line variable definitions
@@ -284,3 +284,4 @@ download: download-osx download-linux download-win
284284
$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
285285

286286
.PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources
287+
.PHONY: FORCE

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
# Pattern rule to print variables, e.g. make print-top_srcdir
6-
print-%:
6+
print-%: FORCE
77
@echo '$*'='$($*)'
88

99
DIST_SUBDIRS = secp256k1 univalue

0 commit comments

Comments
 (0)