qemu/Makefile cleanup

This commit is contained in:
Nguyen Anh Quynh
2020-04-28 13:50:50 +08:00
parent 21b5c122a3
commit 2b13230a4d

View File

@ -42,7 +42,7 @@ GENERATED_SOURCES += qapi-types.c qapi-visit.c
Makefile: ; Makefile: ;
configure: ; configure: ;
.PHONY: all clean cscope distclean recurse-all .PHONY: all clean distclean recurse-all
$(call set-vpath, $(SRC_PATH)) $(call set-vpath, $(SRC_PATH))
@ -110,7 +110,7 @@ $(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
clean: clean:
find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
rm -f TAGS cscope.* *~ */*~ rm -f TAGS *~ */*~
@# May not be present in GENERATED_HEADERS @# May not be present in GENERATED_HEADERS
rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp)
rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp)
@ -121,18 +121,12 @@ clean:
distclean: clean distclean: clean
rm -f config-host.mak config-host.h* rm -f config-host.mak config-host.h*
rm -f config-all-devices.mak rm -f config-all-devices.mak
rm -f config.log rm -f config.log config.status
for d in $(TARGET_DIRS); do \ for d in $(TARGET_DIRS); do \
rm -rf $$d || exit 1 ; \ rm -rf $$d || exit 1 ; \
done done
cscope:
rm -f ./cscope.*
find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' > ./cscope.files
cscope -b
# Add a dependency on the generated files, so that they are always # Add a dependency on the generated files, so that they are always
# rebuilt before other object files # rebuilt before other object files
ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail)) ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))