Fix make clean
Commit 82399a9239 assumes you can override `make clean` on the fact
that prerequisites of the same target are merged. This is true but
unfortunately defining a `clean` target prevents automake from
generating its own one, hence the default clean actions are not
performed. This can be easily seen by inspecting the generated
`Makefile`.
Solve this issue by manually chaining up the default action.
This commit is contained in:
parent
edd473c36b
commit
89f81d638c
|
|
@ -13,15 +13,14 @@ modules_install:
|
||||||
$(KBUILD) modules_install
|
$(KBUILD) modules_install
|
||||||
|
|
||||||
|
|
||||||
# Call Kbuild clean *before* automake `clean` (see #5 for the rationale)
|
# Override default `clean` target to call Kbuild clean *before* automake
|
||||||
# by adding `kbuild-clean` to the clean prerequisites. Having targets
|
# `clean` (see #5 for the rationale).
|
||||||
# with the same name will result in merging the prerequisites, i.e.:
|
|
||||||
# ```
|
|
||||||
# # Equivalent to 'clean: prerequisite1 prerequisite2'
|
|
||||||
# clean: prerequisite1
|
|
||||||
# clean: prerequisite2
|
|
||||||
# ```
|
|
||||||
clean: kbuild-clean
|
clean: kbuild-clean
|
||||||
|
@if test -z "$(SUBDIRS)"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) clean-am ; \
|
||||||
|
else \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) clean-recursive ; \
|
||||||
|
fi
|
||||||
|
|
||||||
kbuild-clean:
|
kbuild-clean:
|
||||||
$(KBUILD) clean
|
$(KBUILD) clean
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue