* Jimmy Durand Wesolowski ([email protected]) wrote:
> From: Jimmy Durand Wesolowski <[email protected]>
> 
> ---
>  doc/examples/Makefile.am     |    2 +-
>  doc/examples/gen-tp/Makefile |    9 ++++++---
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
> index 8c4901b..303a11e 100644
> --- a/doc/examples/Makefile.am
> +++ b/doc/examples/Makefile.am
> @@ -45,7 +45,7 @@ all-local:
>               done; \
>       fi
>       for subdir in $(SUBDIRS_PROXY); do \
> -             cd $$subdir && $(MAKE) AM_CPPFLAGS="-I../../../include/" 
> AM_LDFLAGS='-L../../../liblttng-ust/.libs/ 
> -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' 
> LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all; cd ..; \
> +             cd $$subdir && $(MAKE) AM_CPPFLAGS="${CPPFLAGS} 
> -I../../../include/" AM_LDFLAGS='${LDFLAGS} -L../../../liblttng-ust/.libs/ 
> -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' 
> LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all; cd ..; \
>       done
>  
>  clean-local:
> diff --git a/doc/examples/gen-tp/Makefile b/doc/examples/gen-tp/Makefile
> index e5e3cd3..c2dd05d 100644
> --- a/doc/examples/gen-tp/Makefile
> +++ b/doc/examples/gen-tp/Makefile
> @@ -1,6 +1,8 @@
>  # Copyright (C) 2011-2012  Matthew Khouzam <[email protected]>
>  # Copyright (C) 2012  Mathieu Desnoyers <[email protected]>
>  # Copyright (C) 2012  Yannick Brosseau <[email protected]>
> +# Copyright (C) 2013  Jimmy Durand Wesolowski
> +#                       <[email protected]>
>  #
>  # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
>  # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
> @@ -39,8 +41,9 @@ sample.o: sample.c sample_tracepoint.h
>  
>  # This rule generate .o only and depends on rules for generating
>  # the .h and .c
> +
>  %.o: %.tp %.c %.h
> -     $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
> +     CFLAGS="$(AM_CPPFLAGS)" $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<

The intent behind the examples is that they are installed in
/usr/share/doc, and should be built both from within the source tree and
when installed in the system. This dependency on AM_CPPFLAGS does not
meet this requirement.

Also, you are mixing CPPFLAGS and CFLAGS here.

Thanks,

Mathieu

>  
>  # The following rule can be used to generate all files instead of having one
>  # for each file type. Note that the sample.o has a dependency on the
> @@ -49,10 +52,10 @@ sample.o: sample.c sample_tracepoint.h
>  #    lttng-gen-tp $<
>  
>  %.h: %.tp
> -     $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
> +     CFLAGS="$(AM_CPPFLAGS)" $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
>  
>  %.c: %.tp
> -     $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
> +     CFLAGS="$(AM_CPPFLAGS)" $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
>  
>  .PHONY: clean
>  clean:
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> lttng-dev mailing list
> [email protected]
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to