From 5bbe29d3b8e5c249bb6e05fa46afc5fda1e4c38b Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sat, 22 Feb 2025 15:36:45 +0100 Subject: makefile: Define all phony targets --- Makefile | 4 ++-- src/Makefile | 4 ++-- tests/Makefile | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8014b02..d085432 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ include config.mk +.PHONY: all test clean install uninstall + all: $(MAKE) -C src all -.PHONY: test clean - test: all $(MAKE) -C tests diff --git a/src/Makefile b/src/Makefile index 34d7982..b371b09 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,7 @@ include ../config.mk +.PHONY: all clean + SOURCES=*.cpp HEADERS=*.h @@ -14,7 +16,5 @@ program_info.h: echo "const std::string PROGRAM_NAME_STR {\"$(PROGRAM_NAME)\"};" >program_info.h echo "const std::string PROGRAM_VERSION_STR {\"$(PROGRAM_VERSION)\"};" >>program_info.h -.PHONY: clean - clean: rm -f *.o *~ $(PROGRAM_NAME) program_info.h diff --git a/tests/Makefile b/tests/Makefile index f34fb0d..cc92441 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,7 @@ PROGRAM_EXEC=../src/$(PROGRAM_NAME) +.PHONY: all + all: for t in [0-9]*.sh ; do \ echo $$t; \ -- cgit v1.2.3