aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-01-12 13:08:14 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-01-12 13:08:14 -0500
commit854ed7e1784957c9ce60835136b39abaecd84254 (patch)
treed1da88ffb8fc1efda7f4515d316d400923b32c3a
parentc5422273b98f9bf2cfa5c7db3f83565718062e2a (diff)
trace-cmd: Fix Makfile to not always build ks_version.h
With the way the depends were set up, ks_version.h was always being built even when building the non gui files. This lead to a constant annoying message that would state the ks_version.h was up to date. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c08b57e..b7e4110 100644
--- a/Makefile
+++ b/Makefile
@@ -253,6 +253,7 @@ tc_version.h: force
253all_objs := $(sort $(ALL_OBJS)) 253all_objs := $(sort $(ALL_OBJS))
254all_deps := $(all_objs:%.o=.%.d) 254all_deps := $(all_objs:%.o=.%.d)
255gui_deps := $(gui_objs:%.o=.%.d) 255gui_deps := $(gui_objs:%.o=.%.d)
256non_gui_deps = $(filter-out $(gui_deps),$(all_deps))
256 257
257define check_gui_deps 258define check_gui_deps
258 if [ ! -z "$(filter $(gui_deps),$(@))" ]; then \ 259 if [ ! -z "$(filter $(gui_deps),$(@))" ]; then \
@@ -268,14 +269,19 @@ define check_gui_deps
268 fi; 269 fi;
269endef 270endef
270 271
271$(all_deps): tc_version.h ks_version.h 272$(gui_deps): ks_version.h
273$(non_gui_deps): tc_version.h
272 274
273$(all_deps): .%.d: %.c 275$(all_deps): .%.d: %.c
274 $(Q)$(call check_gui_deps) 276 $(Q)$(call check_gui_deps)
275 277
276$(all_objs) : %.o : .%.d 278$(all_objs) : %.o : .%.d
277 279
278dep_includes := $(wildcard $(all_deps)) 280ifeq ($(BUILDGUI), 1)
281dep_includes := $(wildcard $(gui_deps))
282else
283dep_includes := $(wildcard $(non_gui_deps))
284endif
279 285
280ifneq ($(dep_includes),) 286ifneq ($(dep_includes),)
281 include $(dep_includes) 287 include $(dep_includes)