diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-12-19 09:56:15 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-12-19 09:56:15 -0500 |
commit | 03a44d2ee839735dd44102c5c93b68ebc93b5d50 (patch) | |
tree | 0653a564f0073b0ae9665213be1b7381eca64f41 /Makefile | |
parent | 038579b8fd9b96a207cb45e0adf113e881d8ff8d (diff) | |
download | bfs-03a44d2ee839735dd44102c5c93b68ebc93b5d50.tar.xz |
Makefile: Fix behaviour if .flags doesn't exist yet
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -169,6 +169,10 @@ $(BIN_GOALS): %.o: %.c .flags $(CC) $(ALL_CFLAGS) -c $< -o $@ +# Need a rule for .flags to convince make to apply the above pattern rule if +# .flags didn't exist when make was run +.flags: + # Make sure that "make release" builds everything, but "make release main.o" doesn't $(FLAG_GOALS): $(FLAG_PREREQS) @: @@ -193,7 +197,7 @@ endif +$(MAKE) -B check $(DISTCHECK_FLAGS) clean: - $(RM) $(BIN_GOALS) *.[od] *.gcda *.gcno tests/*.[od] tests/*.gcda tests/*.gcno + $(RM) $(BIN_GOALS) .flags *.[od] *.gcda *.gcno tests/*.[od] tests/*.gcda tests/*.gcno install: $(MKDIR) $(DESTDIR)$(PREFIX)/bin @@ -207,4 +211,6 @@ uninstall: .PHONY: default all $(FLAG_GOALS) check $(CHECKS) distcheck clean install uninstall +.SUFFIXES: + -include $(wildcard *.d) |