From 2115182f0c3125935b18ee788ef5b36c3c68d911 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Thu, 8 May 2014 14:56:58 +0400 Subject: Makefile: strip tools and modules too Commit 52ba784d3 replaced $(STRIP_OPT) with $(STRIP) in some places (for example, Makefile.target), but not all of them. There are a few places remain in main Makefile which still uses $(STRIP_OPT). Replace these places with $(STRIP) too. While at it, simplify variable pattern substitution of the surrounding places, change $(patsubst pat,rep,$(var)) into $(var:pat=rep) which is much easier to read (this is probably a good idea to do everywhere). Signed-off-by: Michael Tokarev Cc: Fam Zheng Cc: Paolo Bonzini Signed-off-by: Paolo Bonzini --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 423e373..23ca444 100644 --- a/Makefile +++ b/Makefile @@ -372,17 +372,25 @@ install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ install-datadir install-localstatedir $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ifneq ($(TOOLS),) - $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)" + $(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)" +ifneq ($(STRIP),) + $(STRIP) $(TOOLS:%="$(DESTDIR)$(bindir)/%") +endif endif ifneq ($(CONFIG_MODULES),) $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" - for s in $(patsubst %.mo,%$(DSOSUF),$(modules-m)); do \ - $(INSTALL_PROG) $(STRIP_OPT) $$s "$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ + for s in $(modules-m:.mo=$(DSOSUF)); do \ + t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ + $(INSTALL_PROG) $$s "$$t"; \ + test -z "$(STRIP)" || $(STRIP) "$$t"; \ done endif ifneq ($(HELPERS-y),) $(INSTALL_DIR) "$(DESTDIR)$(libexecdir)" - $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)" + $(INSTALL_PROG) $(HELPERS-y) "$(DESTDIR)$(libexecdir)" +ifneq ($(STRIP),) + $(STRIP) $(HELPERS-y:%="$(DESTDIR)$(libexecdir)/%") +endif endif ifneq ($(BLOBS),) set -e; for x in $(BLOBS); do \ -- cgit v1.1 From 264f8b4fdc7b4ef304c426589b7fe198ca693823 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Thu, 8 May 2014 15:06:03 +0400 Subject: Makefile: use $(INSTALL_LIB) for modules not $(INSTALL_PROG) We have $(INSTALL_LIB) which is the same as $(INSTALL_PROG) but uses correct permissions. Loadable objects (modules) are like shared libraries, not like programs. Signed-off-by: Michael Tokarev Cc: Fam Zheng Cc: Paolo Bonzini Signed-off-by: Paolo Bonzini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 23ca444..12ea464 100644 --- a/Makefile +++ b/Makefile @@ -381,7 +381,7 @@ ifneq ($(CONFIG_MODULES),) $(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)" for s in $(modules-m:.mo=$(DSOSUF)); do \ t="$(DESTDIR)$(qemu_moddir)/$$(echo $$s | tr / -)"; \ - $(INSTALL_PROG) $$s "$$t"; \ + $(INSTALL_LIB) $$s "$$t"; \ test -z "$(STRIP)" || $(STRIP) "$$t"; \ done endif -- cgit v1.1 From 849d8284c5171dcfe61212019f8457d370e7a6bc Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Fri, 2 May 2014 15:40:53 +0400 Subject: build: convert some obj-specific CFLAGS to use new foo.o-cflags syntax Current Makefile system allows using foo.o-cflags variables to store object-specific CFLAGS. Convert some usages of old syntax (using QEMU_CFLAGS += construct) to the new syntax. Do not touch multifile modules for now, as build system isn't ready for this. Signed-off-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- Makefile | 6 ------ 1 file changed, 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 12ea464..52442bf 100644 --- a/Makefile +++ b/Makefile @@ -148,10 +148,6 @@ endif all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules -vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) - -vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS) - config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak qemu-options.def: $(SRC_PATH)/qemu-options.hx @@ -195,8 +191,6 @@ ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) -bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) - $(BUILD_DIR)/version.o: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h | $(BUILD_DIR)/version.lo $(call quiet-command,$(WINDRES) -I$(BUILD_DIR) -o $@ $<," RC version.o") $(BUILD_DIR)/version.lo: $(SRC_PATH)/version.rc $(BUILD_DIR)/config-host.h -- cgit v1.1