[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/21] Makefile: Fix "make cscope TAGS"
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 17/21] Makefile: Fix "make cscope TAGS" |
Date: |
Mon, 22 Jun 2015 14:16:24 +0300 |
From: Fam Zheng <address@hidden>
Cscope and TAGS files work in source directory rather than the build
directory, also, don't ask users to run configure first, because they
may have an out of tree build.
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
Makefile | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 3f97904..8d36076 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,11 @@
# Always point to the root of the build tree (needs GNU make).
BUILD_DIR=$(CURDIR)
+# Before including a proper config-host.mak, assume we are in the source tree
+SRC_PATH=.
+
+UNCHECKED_GOALS := %clean TAGS cscope
+
# All following code might depend on configuration variables
ifneq ($(wildcard config-host.mak),)
# Put the all: rule here so that config-host.mak can contain dependencies.
@@ -38,7 +43,7 @@ config-host.mak: $(SRC_PATH)/configure
fi
else
config-host.mak:
-ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
+ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if
$(MAKECMDGOALS),,fail))
@echo "Please call configure before running make!"
@exit 1
endif
@@ -433,9 +438,9 @@ TAGS:
find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
cscope:
- rm -f ./cscope.*
- find "$(SRC_PATH)" -name "*.[chsS]" -print | sed 's,^\./,,' >
./cscope.files
- cscope -b
+ rm -f "$(SRC_PATH)"/cscope.*
+ find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed 's,^\./,,' >
"$(SRC_PATH)/cscope.files"
+ cscope -b -i"$(SRC_PATH)/cscope.files"
# opengl shader programs
ui/shader/%-vert.h: $(SRC_PATH)/ui/shader/%.vert
$(SRC_PATH)/scripts/shaderinclude.pl
@@ -578,7 +583,7 @@ endif # CONFIG_WIN
# Add a dependency on the generated files, so that they are always
# rebuilt before other object files
-ifneq ($(filter-out %clean,$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
+ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if
$(MAKECMDGOALS),,fail))
Makefile: $(GENERATED_HEADERS)
endif
--
2.1.4
- [Qemu-devel] [PULL 00/21] Trivial patches for 2015-06-22, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 01/21] configure: append --extra-ldflags to LDFLAGS, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 19/21] hw/display/cg3.c: Fix memory leak, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 14/21] throttle: Fix typo in the documentation of block_set_io_throttle, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 08/21] wdt_i6300esb: QOMify, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 10/21] vt82c686: QOMify, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 18/21] Makefile: Add "make ctags", Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 17/21] Makefile: Fix "make cscope TAGS",
Michael Tokarev <=
- [Qemu-devel] [PULL 07/21] piix4: QOMify, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 04/21] Print error when failing to load PCI config data, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 20/21] hw/display/tcx.c: Fix memory leak, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 21/21] util/qemu-sockets: improve ai_flag hints for ipv6 hosts, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 09/21] xen_pt: QOMify, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 06/21] piix: piix3 QOMify, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 15/21] qemu-options: Improve -global documentation, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 05/21] pci-assign: QOMify, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 11/21] libcacard: pkgconfig: tidy dependent libs, Michael Tokarev, 2015/06/22
- [Qemu-devel] [PULL 03/21] Grammar: 'as to'->'as for', Michael Tokarev, 2015/06/22