Skip to content

Commit

Permalink
build: run commands silently on config targets
Browse files Browse the repository at this point in the history
And also add an "error: " prefix, to make the output clearer.

Before:

    $ rm -f config.mk; make config.mk
    printf 'run ./configure to generate %s\n' "config.mk" >&2
    run ./configure to generate config.mk
    false
    make: *** No rule to make target 'config.mk'.  Stop.

After:

    $ rm -f config.mk; make config.mk
    error: run ./configure to generate config.mk
    make: *** No rule to make target 'config.mk'.  Stop.

This amends commit e21637c ("makefiles: add generated files as
dependencies", 2022-06-23) / PR netblue30#5219.
  • Loading branch information
kmk3 committed Jan 27, 2023
1 parent cb65de5 commit 4031155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS)
all: all_items mydirs $(MAN_TARGET) filters

config.mk config.sh:
printf 'run ./configure to generate %s\n' "$@" >&2
false
@printf 'error: run ./configure to generate %s\n' "$@" >&2
@false

.PHONY: all_items $(ALL_ITEMS)
all_items: $(ALL_ITEMS)
Expand Down

0 comments on commit 4031155

Please sign in to comment.