[lttng-dev] [PATCH 2/2] Add the CFLAGS for an "out of system" building of the gen-tp example files.

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Aug 22 10:39:26 EDT 2013


* Jimmy Durand Wesolowski (jimmy.durand.wesolowski at gmail.com) wrote:
> 2013/8/22 Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> 
> > * Jimmy Durand Wesolowski (jimmy.durand.wesolowski at gmail.com) wrote:
> > > 2013/8/22 Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> > >
> > > > * Jimmy Durand Wesolowski (jimmy.durand.wesolowski at gmail.com) wrote:
> > > > >  %.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.
> > > >
> > > Actually, the problem was if you add custom CFLAGS (a custom
> > userspace-rcu
> > > location for example), they will not be set here, and thus, the build
> > fails.
> >
> > I understand that we might need to fix something, but I think this is
> > not done at the right level in your patches.
> >
> > We could keep the CFLAGS/LDFLAGS/CPPFLAGS use as we have currently in
> > the tree, but also modify doc/examples/Makefile.am so it passes extra
> > flags (the AM_CFLAGS/AM_LDFLAGS/AM_CPPFLAGS) to the subdirectories when
> > invoking their respective makefile.
> >
> > Therefore, it would not add automake-specific stuff into a Makefile that
> > is meant to be installed in /usr/share/doc.
> >
> Oh, OK.
> Do you want me to add an
> export CFLAGS
> export CPPFLAGS
> export CC
> in the doc/examples/Makefile.am ?
> Or add it on the make calling loop if you prefer avoiding exports ?

Ideally in the make calling loop. I think I vaguely remember that export
were not always supported in automake.

Thanks,

Mathieu

> 
> This would allow no AM_* reference in a generic Makefile.
> 
> 
> Thanks,
> >
> Thank you.
> -- 
> Jimmy Durand Wesolowski
> OpenWide R&D engineer
> OneAccess

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



More information about the lttng-dev mailing list