From bba0b62f4e9e17927b9a2cda51dd5a4aa1b1f14e Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Thu, 2 Oct 2025 15:40:03 +0200 Subject: examples: Add distclean target --- Makefile | 4 ++++ examples/Makefile | 3 +++ examples/headers/Makefile | 3 +++ examples/hello/Makefile | 3 +++ examples/html/Makefile | 3 +++ examples/put/Makefile | 3 +++ 6 files changed, 19 insertions(+) diff --git a/Makefile b/Makefile index 9069f27..6027ed4 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,10 @@ clean: rm -f $(OBJECTS) $(DEPS) +cd examples && $(MAKE) clean +distclean: clean + rm -f $(PROJECT_A) $(PROJECT_SO) + +cd examples && $(MAKE) distclean + FORCE: examples: FORCE diff --git a/examples/Makefile b/examples/Makefile index e6030ac..b06f0a5 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -13,6 +13,9 @@ all: FORCE clean: FORCE +for d in $(DIRS); do (cd $$d && $(MAKE) clean); done +distclean: clean + +for d in $(DIRS); do (cd $$d && $(MAKE) distclean); done + $(DIRS): FORCE +cd $@ && $(MAKE) diff --git a/examples/headers/Makefile b/examples/headers/Makefile index 4905fbd..c8c5f54 100644 --- a/examples/headers/Makefile +++ b/examples/headers/Makefile @@ -14,6 +14,9 @@ all: $(PROJECT) clean: rm -f $(DEPS) +distclean: clean + rm -f $(PROJECT) + FORCE: $(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR) diff --git a/examples/hello/Makefile b/examples/hello/Makefile index e31bd6d..4e22af2 100644 --- a/examples/hello/Makefile +++ b/examples/hello/Makefile @@ -14,6 +14,9 @@ all: $(PROJECT) clean: rm -f $(DEPS) +distclean: clean + rm -f $(PROJECT) + FORCE: $(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR) diff --git a/examples/html/Makefile b/examples/html/Makefile index 59612ed..e7dae66 100644 --- a/examples/html/Makefile +++ b/examples/html/Makefile @@ -14,6 +14,9 @@ all: $(PROJECT) clean: rm -f $(DEPS) +distclean: clean + rm -f $(PROJECT) + FORCE: $(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR) diff --git a/examples/put/Makefile b/examples/put/Makefile index 972208b..0a15069 100644 --- a/examples/put/Makefile +++ b/examples/put/Makefile @@ -14,6 +14,9 @@ all: $(PROJECT) clean: rm -f $(DEPS) +distclean: clean + rm -f $(PROJECT) + FORCE: $(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR) -- cgit v1.2.3