tools: fix "make distclean"

The original rule to target "distclean" in tools/Rules.mk was in effect
"make clean". It should be "make distclean".

However not all Makefiles in subdirectories have distclean target
defined. So this patch also adds a bunch of distclean targets to various
Makefiles. They only depend on clean target and don't have any actions
in most cases.

With the patch applied, following command outputs 0 results:

  find tools -name 'Makefile*' -exec grep -L 'distclean' {} \+ \
     | grep -v ocaml | grep -v libfsimage

Ocaml and libfsimage are known to have distclean defined in a dedicated
rules file.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Wei Liu authored and Ian Campbell committed 2015-01-27 16:34:45 +00:00
1 parent 675b2d22a0
commit f9c9b12775
57 files changed
+166 -22

No files matched your search

+1 -1
View File
@@ -121,7 +121,7 @@ subdir-all-% subdir-clean-% subdir-install-%: .phony
$(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)
subdir-distclean-%: .phony
$(MAKE) -C $* clean
$(MAKE) -C $* distclean
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
$(XEN_ROOT)/config/Tools.mk:
+4 -2
View File
@@ -14,5 +14,7 @@ SUBDIRS-$(CONFIG_Linux) += control
clean:
rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) TAGS
.PHONY: all clean install
all clean install: %: subdirs-%
distclean: clean
.PHONY: all clean install distclean
all clean install distclean: %: subdirs-%
+3 -1
View File
@@ -73,6 +73,8 @@ clean:
rm -f $(LIBNAME).so $(LIBSONAME)
rm -f *~
.PHONY: all build clean install
distclean: clean
.PHONY: all build clean distclean install
-include $(DEPS)
+3 -1
View File
@@ -108,4 +108,6 @@ install: all
clean:
rm -rf .*.d *.o *~ xen TAGS $(IBIN) $(LIB) $(LOCK_UTIL) $(QCOW_UTIL)
.PHONY: clean install
distclean: clean
.PHONY: clean install distclean
+3
View File
@@ -12,3 +12,6 @@ install:
.PHONY: clean
clean:
@:
.PHONY: distclean
distclean: clean
+3 -1
View File
@@ -29,6 +29,8 @@ lvm-util: lvm-util.o
clean:
rm -rf *.o *.opic *~ $(DEPS) $(IBIN)
.PHONY: all build clean install lvm-util
distclean: clean
.PHONY: all build clean distclean install lvm-util
-include $(DEPS)
+3 -1
View File
@@ -44,6 +44,8 @@ install: all
clean: subdirs-clean
rm -rf *.o *~ $(DEPS) $(IBIN)
.PHONY: all build clean install vhd-util vhd-update
distclean: clean
.PHONY: all build clean distclean install vhd-util vhd-update
-include $(DEPS)
+3 -1
View File
@@ -75,6 +75,8 @@ install: all
clean:
rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD)
.PHONY: all build clean install libvhd
distclean: clean
.PHONY: all build clean distclean install libvhd
-include $(DEPS)
+3
View File
@@ -22,6 +22,9 @@ clean:
$(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS)
$(RM) client/*.o daemon/*.o
.PHONY: distclean
distclean: clean
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_xenconsoled) $(APPEND_LDFLAGS)
+4 -1
View File
@@ -11,4 +11,7 @@ console-domU: console-domU.o
procpipe: procpipe.o
.PHONY: clean
clean:; $(RM) *.o console-domU console-dom0 procpipe
clean: $(RM) *.o console-domU console-dom0 procpipe
.PHONY: distclean
distclean: clean
+4
View File
@@ -12,6 +12,10 @@ clean:
rm -f xg_all.a gx_all.a gdbsx
set -e; for d in xg gx; do $(MAKE) -C $$d clean; done
.PHONY: distclean
distclean: clean
set -e; for d in xg gx; do $(MAKE) -c $$d distclean; done
.PHONY: install
install: all
[ -d $(DESTDIR)$(SBINDIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+2
View File
@@ -11,6 +11,8 @@ all: gx_all.a
clean:
rm -rf gx_all.a *.o .*.d
.PHONY: distclean
distclean: clean
#%.o: %.c $(GX_HDRS) Makefile
# $(CC) -c $(CFLAGS) -o $@ $<
+2
View File
@@ -33,3 +33,5 @@ xen-headers:
clean:
rm -rf xen xg_all.a $(XG_OBJS) .*.d
.PHONY: distclean
distclean: clean
+3
View File
@@ -16,6 +16,9 @@ kdd: $(OBJS)
clean:
rm -f $(OBJS) $(DEPS) kdd
.PHONY: distclean
distclean: clean
.PHONY: install
install: all
[ -d $(DESTDIR)$(SBINDIR) ] || $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
+3
View File
@@ -43,3 +43,6 @@ install-configs: $(XEN_CONFIGS)
.PHONY: clean
clean:
.PHONY: distclean
distclean: clean
+3
View File
@@ -139,4 +139,7 @@ clean: subdirs-clean
rm -f roms.inc roms.inc.new acpi.h
rm -f hvmloader hvmloader.tmp *.o $(DEPS)
.PHONY: distclean
distclean: clean
-include $(DEPS)
+2
View File
@@ -66,6 +66,8 @@ clean:
rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz $(DEPS)
rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt dsdt_*.asl
distclean: clean
install: all
-include $(DEPS)
+3
View File
@@ -15,6 +15,9 @@ all: subdirs-all
clean: subdirs-clean
rm -rf *.o $(TARGET) $(DEPS)
.PHONY: distclean
distclean: subdirs-distclean
$(TARGET): 32bitbios_all.o
sh mkhex highbios_array 32bitbios_all.o > $@
@@ -12,6 +12,9 @@ all: $(TARGET)
clean:
rm -rf *.o $(TARGET) $(DEPS)
.PHONY: distclean
distclean: clean
$(TARGET): tcgbios.o tpm_drivers.o
$(LD) $(LDFLAGS_DIRECT) -r $^ -o $@
+3
View File
@@ -15,6 +15,9 @@ clean: subdirs-clean
rm -f BIOS-bochs-*
rm -f $(DEPS)
.PHONY: distclean
distclean: clean
BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
gcc -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
+3
View File
@@ -25,6 +25,9 @@ clean:
temp.awk.* vgabios*.orig _vgabios_* _vgabios-debug_* core vgabios*.bin vgabios*.txt $(RELEASE).bin *.bak
rm -f VGABIOS-lgpl-latest*.bin
.PHONY: distclean
distclean: clean
.PHONY: release
release:
VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios
+2 -2
View File
@@ -4,6 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk
SUBDIRS-y := utils
SUBDIRS-$(FLASK_POLICY) += policy
.PHONY: all clean install
all clean install: %: subdirs-%
.PHONY: all clean install distclean
all clean install distclean: %: subdirs-%
+3 -1
View File
@@ -115,4 +115,6 @@ policy.conf: $(POLICY_SECTIONS)
clean:
$(RM) tmp policy.conf $(POLICY_FILENAME)
.PHONY: all install clean
distclean: clean
.PHONY: all install clean distclean
+3
View File
@@ -39,6 +39,9 @@ clean:
rm -f $(CLIENTS)
$(RM) $(DEPS)
.PHONY: distclean
distclean: clean
.PHONY: print-dir
print-dir:
@echo -n tools/flask/utils:
+3
View File
@@ -40,3 +40,6 @@ install-rcd:
.PHONY: clean
clean:
.PHONY: distclean
distclean: clean
+3
View File
@@ -81,3 +81,6 @@ install-udev:
.PHONY: clean
clean: subdirs-clean
.PHONY: distclean
distclean: clean
+3
View File
@@ -28,6 +28,9 @@ all: $(ALL_XEN_SYSTEMD)
clean:
rm -f $(XEN_SYSTEMD_MODULES)
.PHONY: distclean
distclean: clean
.PHONY: install
install: $(ALL_XEN_SYSTEMD)
[ -d $(DESTDIR)$(XEN_SYSTEMD_DIR) ] || \
+2 -2
View File
@@ -6,5 +6,5 @@ SUBDIRS-$(CONFIG_NetBSD) += NetBSD
SUBDIRS-$(CONFIG_Linux) += Linux
SUBDIRS-$(CONFIG_FreeBSD) += FreeBSD
.PHONY: all clean install
all clean install: %: subdirs-%
.PHONY: all clean install distclean
all clean install distclean: %: subdirs-%
+3
View File
@@ -42,3 +42,6 @@ install-rcd:
.PHONY: clean
clean:
.PHONY: distclean
distclean: clean
+3
View File
@@ -37,3 +37,6 @@ install-scripts: build
.PHONY: clean
clean:
rm -f $(HOTPLUGPATH)
.PHONY: distclean
distclean: clean
+3
View File
@@ -50,3 +50,6 @@ clean:
rm -rf xen
$(MAKE) -C xen-foreign clean
.PHONY: distclean
distclean: clean
+3 -1
View File
@@ -6,7 +6,7 @@ ROOT = $(XEN_ROOT)/xen/include/public
architectures := arm32 arm64 x86_32 x86_64
headers := $(patsubst %, %.h, $(architectures))
.PHONY: all clean check-headers
.PHONY: all clean distclean check-headers
all: $(headers) check-headers
clean:
@@ -14,6 +14,8 @@ clean:
rm -f checker checker.c
rm -f *.pyc *.o *~
distclean: clean
checker: checker.c $(headers)
$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
+3
View File
@@ -170,6 +170,9 @@ clean:
$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS) \
$(OSDEP_LIB_OBJS) $(OSDEP_PIC_OBJS)
.PHONY: distclean
distclean: clean
.PHONY: rpm
rpm: build
rm -rf staging
+4 -1
View File
@@ -39,6 +39,9 @@ install: all
clean:
rm -rf *.a *.o *~ $(DEPS)
.PHONY: all build clean install
.PHONY: distclean
distclean: clean
.PHONY: all build clean install distclean
-include $(DEPS)
+3
View File
@@ -62,6 +62,9 @@ install: build
clean:
$(RM) *.o $(TARGETS_BUILD) *~ $(DEPS)
.PHONY: distclean
distclean: clean
xen-hvmctx: xen-hvmctx.o
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
+3
View File
@@ -20,3 +20,6 @@ install: subdirs-install
.PHONY: clean
clean: subdirs-clean
.PHONY: distclean
distclean: subdirs-distclean
+2
View File
@@ -47,6 +47,8 @@ ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS))
clean: $(CLEAN_HOOKS)
$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make META
distclean: clean
quiet-command = $(if $(V),$1,@printf " %-8s %s\n" "$2" "$3" && $1)
mk-caml-lib-native = $(call quiet-command, $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $1 $2 $3,MLA,$1)
+3
View File
@@ -15,3 +15,6 @@ install: subdirs-install
.PHONY: clean
clean: subdirs-clean
.PHONY: distclean
distclean: subdirs-distclean
+3
View File
@@ -23,4 +23,7 @@ install: all
clean:
rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out $(DEPS)
.PHONY: distclean
distclean: clean
-include $(DEPS)
+3
View File
@@ -28,4 +28,7 @@ clean:
rm -rf build/
rm -f $(DEPS)
.PHONY: distclean
distclean: clean
-include $(DEPS)
+4 -1
View File
@@ -1,7 +1,10 @@
.PHONY: all clean
.PHONY: all clean distclean
all:
$(MAKE) -C tools
clean:
$(MAKE) -C tools clean
distclean:
$(MAKE) -C tools distclean
+3
View File
@@ -19,5 +19,8 @@ install: xen-mceinj
clean:
$(RM) *.o xen-mceinj
.PHONY: distclean
distclean: clean
xen-mceinj: xen-mceinj.o Makefile
$(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore)
+3
View File
@@ -20,6 +20,9 @@ build: $(TARGETS)
clean:
$(RM) *.o $(TARGETS) *~ $(DEPS)
.PHONY: distclean
distclean: clean
memshrtool: memshrtool.o
$(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl)
+2 -2
View File
@@ -22,8 +22,8 @@ check-python-syntax: runtime-environment
.PHONY: runtime-environment
runtime-environment: $(PYTHON_VERSIONS)
.PHONY: dist-clean
dist-clean:
.PHONY: distclean
distclean:
rm -fr $(REG_TEST_DIR)/installed $(REG_TEST_DIR)/downloads \
$(REG_TEST_DIR)/build
+3
View File
@@ -26,6 +26,9 @@ $(TARGET): hpet.c main.c hpet.h emul.h Makefile
clean:
rm -rf $(TARGET) $(TARGET).out *.o *~ core* hpet.h hpet.c
.PHONY: distclean
distclean: clean
.PHONY: install
install:
+3
View File
@@ -34,6 +34,9 @@ $(TARGET): x86_emulate.o test_x86_emulator.o
clean:
rm -rf $(TARGET) *.o *~ core blowfish.h blowfish.bin x86_emulate
.PHONY: distclean
distclean: clean
.PHONY: install
install:
+3
View File
@@ -21,6 +21,9 @@ build: $(TARGETS)
clean:
$(RM) *.o $(TARGETS) *~ $(DEPS)
.PHONY: distclean
distclean: clean
xen-access: xen-access.o Makefile
$(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest)
+3
View File
@@ -42,4 +42,7 @@ clean:
$(RM) *.o $(PROGRAMS)
$(RM) $(DEPS)
.PHONY: distclean
distclean: clean
-include $(DEPS)
+3
View File
@@ -32,6 +32,9 @@ install: build
clean:
$(RM) *.a *.so *.o $(DEPS) xenbackendd
.PHONY: distclean
distclean: clean
xenbackendd: xenbackendd.o
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
+3
View File
@@ -40,6 +40,9 @@ clean:
$(RM) -f xenbaked xenbaked.o
$(RM) -f xentrace_setmask setmask.o
.PHONY: distclean
distclean: clean
xenbaked: xenbaked.o Makefile
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
+3 -1
View File
@@ -31,7 +31,9 @@ install: all
clean:
rm -f *.o *~ $(DEPS) xen TAGS $(IBINS) $(LIB)
.PHONY: clean install
distclean: clean
.PHONY: clean install distclean
.PHONY: TAGS
TAGS:
+3
View File
@@ -18,6 +18,9 @@ install: all
clean:
$(RM) -f xenpmd xenpmd.o $(DEPS)
.PHONY: distclean
distclean: clean
xenpmd: xenpmd.o Makefile
$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
+2 -2
View File
@@ -11,6 +11,6 @@ SUBDIRS += xentop
endif
endif
.PHONY: all install clean
.PHONY: all install clean distclean
all install clean: %: subdirs-%
all install clean distclean: %: subdirs-%
+3
View File
@@ -137,4 +137,7 @@ clean:
rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS-y) \
$(BINDINGS) $(BINDINGSRC) $(DEPS)
.PHONY: distclean
distclean: clean
-include $(DEPS)
+3
View File
@@ -42,4 +42,7 @@ endif
clean:
rm -f xentop xentop.o $(DEPS)
.PHONY: distclean
distclean: clean
-include $(DEPS)
+3
View File
@@ -115,6 +115,9 @@ clean:
rm -f xenstore $(CLIENTS)
$(RM) $(DEPS)
.PHONY: distclean
distclean: clean
.PHONY: TAGS
TAGS:
etags `find . -name '*.[ch]'`
+3
View File
@@ -34,6 +34,9 @@ install: build
clean:
$(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN) $(DEPS)
.PHONY: distclean
distclean: clean
xentrace: xentrace.o
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.