diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-01-12 13:08:14 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-01-12 13:08:14 -0500 |
commit | 854ed7e1784957c9ce60835136b39abaecd84254 (patch) | |
tree | d1da88ffb8fc1efda7f4515d316d400923b32c3a | |
parent | c5422273b98f9bf2cfa5c7db3f83565718062e2a (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-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -253,6 +253,7 @@ tc_version.h: force | |||
253 | all_objs := $(sort $(ALL_OBJS)) | 253 | all_objs := $(sort $(ALL_OBJS)) |
254 | all_deps := $(all_objs:%.o=.%.d) | 254 | all_deps := $(all_objs:%.o=.%.d) |
255 | gui_deps := $(gui_objs:%.o=.%.d) | 255 | gui_deps := $(gui_objs:%.o=.%.d) |
256 | non_gui_deps = $(filter-out $(gui_deps),$(all_deps)) | ||
256 | 257 | ||
257 | define check_gui_deps | 258 | define 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; |
269 | endef | 270 | endef |
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 | ||
278 | dep_includes := $(wildcard $(all_deps)) | 280 | ifeq ($(BUILDGUI), 1) |
281 | dep_includes := $(wildcard $(gui_deps)) | ||
282 | else | ||
283 | dep_includes := $(wildcard $(non_gui_deps)) | ||
284 | endif | ||
279 | 285 | ||
280 | ifneq ($(dep_includes),) | 286 | ifneq ($(dep_includes),) |
281 | include $(dep_includes) | 287 | include $(dep_includes) |