diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/traceevent/Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index 46c2f6b7b123..14131cb0522d 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile | |||
@@ -207,7 +207,7 @@ libtraceevent.so: $(PEVENT_LIB_OBJS) | |||
207 | libtraceevent.a: $(PEVENT_LIB_OBJS) | 207 | libtraceevent.a: $(PEVENT_LIB_OBJS) |
208 | $(Q)$(do_build_static_lib) | 208 | $(Q)$(do_build_static_lib) |
209 | 209 | ||
210 | $(PEVENT_LIB_OBJS): %.o: $(src)/%.c | 210 | $(PEVENT_LIB_OBJS): %.o: $(src)/%.c TRACEEVENT-CFLAGS |
211 | $(Q)$(do_fpic_compile) | 211 | $(Q)$(do_fpic_compile) |
212 | 212 | ||
213 | define make_version.h | 213 | define make_version.h |
@@ -272,6 +272,16 @@ ifneq ($(dep_includes),) | |||
272 | include $(dep_includes) | 272 | include $(dep_includes) |
273 | endif | 273 | endif |
274 | 274 | ||
275 | ### Detect environment changes | ||
276 | TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):$(ARCH):$(CROSS_COMPILE) | ||
277 | |||
278 | TRACEEVENT-CFLAGS: force | ||
279 | @FLAGS='$(TRACK_CFLAGS)'; \ | ||
280 | if test x"$$FLAGS" != x"`cat TRACEEVENT-CFLAGS 2>/dev/null`" ; then \ | ||
281 | echo 1>&2 " * new build flags or cross compiler"; \ | ||
282 | echo "$$FLAGS" >TRACEEVENT-CFLAGS; \ | ||
283 | fi | ||
284 | |||
275 | tags: force | 285 | tags: force |
276 | $(RM) tags | 286 | $(RM) tags |
277 | find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ | 287 | find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ |
@@ -297,7 +307,7 @@ install: install_lib | |||
297 | 307 | ||
298 | clean: | 308 | clean: |
299 | $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d | 309 | $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d |
300 | $(RM) tags TAGS | 310 | $(RM) TRACEEVENT-CFLAGS tags TAGS |
301 | 311 | ||
302 | endif # skip-makefile | 312 | endif # skip-makefile |
303 | 313 | ||