automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding to CFLAGS for all objects in subdir


From: Tom Tromey
Subject: Re: adding to CFLAGS for all objects in subdir
Date: 13 Mar 2001 23:12:08 -0700

>>>>> "Jeremy" == Jeremy Slade <address@hidden> writes:

Jeremy> In a project, I want all objects (both C and C++) in a certain
Jeremy> subdirectory to include additional flags (defined by
Jeremy> PERL_CFLAGS) in the compile line, but I don't want those flags
Jeremy> used to build object in other directories.

Use AM_CFLAGS.

Jeremy> CFLAGS = $(PERL_CFLAGS)

CFLAGS is a user variable.  Don't set it yourself.

Jeremy> CPPFLAGS=$(PERL_CFLAGS)

CPPFLAGS is also a user variable.

Jeremy> # Must create the $perllibarchdir/auto directory to enable auto-loading
Jeremy> # Also have to chmod Module.sl to be executable after install --
Jeremy> # not initially made executable since it is a _DATA object.
Jeremy> install-data-local:
Jeremy>         $(mkinstalldirs) $(DESTDIR)$(perllibarchdir)/auto
Jeremy>         chmod +x $(DESTDIR)$(perllibarchdir)/Module.sl

That's a bit ugly :-(.
I wouldn't object to a cleaner way to build Perl modules.

Jeremy> Please tell me there's an easier way to do this...

I thought everybody who wrote Perl modules used Perl's MakeMaker
mechanism (isn't that what it is called?  I haven't looked at it since
1996...).

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]