summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-04-18 22:24:17 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-04-18 22:24:17 -0400
commit0c410396f4de2ec03eb5841f0758bd8cedd0a709 (patch)
tree144a57766a0a7dba3e9998f704dd865bdd85a3b8
parentae20140e651f14721cf870b3910421135dbcc3d5 (diff)
downloadbfs-0c410396f4de2ec03eb5841f0758bd8cedd0a709.tar.xz
Makefile: Spread out the .PHONY targets
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8fe13a7..e9a32a9 100644
--- a/Makefile
+++ b/Makefile
@@ -192,8 +192,10 @@ STRATEGY_CHECKS := $(STRATEGIES:%=check-%)
CHECKS := $(STRATEGY_CHECKS) check-trie check-xtimegm
default: bfs
+.PHONY: default
all: $(BIN_GOALS)
+.PHONY: all
bfs: \
build/bar.o \
@@ -240,12 +242,15 @@ build/tests/%.o: tests/%.c .flags | build/tests
# Save the full set of flags to rebuild everything when they change
.flags: FORCE
@./flags.sh $(CC) : $(ALL_CFLAGS) : $(ALL_LDFLAGS) : $(ALL_LDLIBS)
+.PHONY: FORCE
# Make sure that "make release" builds everything, but "make release main.o" doesn't
$(FLAG_GOALS): $(FLAG_PREREQS)
@:
+.PHONY: $(FLAG_GOALS)
check: $(CHECKS)
+.PHONY: check $(CHECKS)
$(STRATEGY_CHECKS): check-%: bfs build/tests/mksock
./tests.sh --bfs="./bfs -S $*" $(TEST_FLAGS)
@@ -263,9 +268,11 @@ ifeq ($(OS) $(ARCH),Linux x86_64)
endif
+$(MAKE) -B release check $(DISTCHECK_FLAGS)
+$(MAKE) -B check $(DISTCHECK_FLAGS)
+.PHONY: distcheck
clean:
$(RM) -r bfs .flags build
+.PHONY: clean
install:
$(MKDIR) $(DESTDIR)$(PREFIX)/bin
@@ -274,13 +281,13 @@ install:
$(INSTALL) -m644 bfs.1 $(DESTDIR)$(MANDIR)/man1/bfs.1
$(MKDIR) $(DESTDIR)$(PREFIX)/share/bash-completion/completions
$(INSTALL) -m644 completions/bfs.bash $(DESTDIR)$(PREFIX)/share/bash-completion/completions/bfs
+.PHONY: install
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/share/bash-completion/completions/bfs
$(RM) $(DESTDIR)$(MANDIR)/man1/bfs.1
$(RM) $(DESTDIR)$(PREFIX)/bin/bfs
-
-.PHONY: default all $(FLAG_GOALS) check $(CHECKS) distcheck clean install uninstall FORCE
+.PHONY: uninstall
.SUFFIXES: