Skip to content

Commit b267ee8

Browse files
committed
build: make 'clean' target an alias for 'purge'
Autotools and many handwritten Makefiles only provide a 'clean' target, which typically removes everything. However, the 'clean' target here does not fully do this, leaving some artifacts behind after it is run. This leads to confusion when, after cleaning, the build step still doesn't reflect configuration changes such as newly installed libraries. Therefore, update the 'clean' target to behave like the 'purge' step. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 9851832 commit b267ee8

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,14 @@ ${NAME}: ${BUILD-DIR}
2424

2525
.PHONY: clean
2626
clean:
27-
ifneq ("$(wildcard ${BUILD-DIR})","")
28-
meson compile --clean -C ${BUILD-DIR}
29-
endif
30-
31-
.PHONY: purge
32-
purge:
3327
ifneq ("$(wildcard ${BUILD-DIR})","")
3428
rm -rf ${BUILD-DIR}
3529
meson subprojects purge --confirm
3630
endif
3731

32+
.PHONY: purge
33+
purge: clean
34+
3835
.PHONY: install
3936
install: ${NAME}
4037
meson install -C ${BUILD-DIR} --skip-subprojects

0 commit comments

Comments
 (0)