Re: [PATCH v5 01/18] Makefile: pass CPPFLAGS through to fllow customization

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

 



On Fri, May 14, 2010 at 09:31:32AM +0000, Gary V. Vaughan wrote:
> Without this patch there is no straight forward way to pass additional
> CPPFLAGS at configure-time.  At TWW, everything non-vendor package is
> installed to its own subdirectory, so we need the following to show
> the preprocessor where the headers for the libraries we will link
> later can be found:
As a point of comparision, this is what we use in Gentoo, to allow us to
override many of the variables:
sed -i \
    -e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
    -e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
    -e 's:^\(CC = \).*$:\1$(OPTCC):' \
    -e 's:^\(AR = \).*$:\1$(OPTAR):' \
    Makefile || die "sed failed"

Which would be equivilent to changing the Makefile to have:
CFLAGS = $(OPTCFLAGS) -Wall
LDFLAGS = $(OPTLDFLAGS)
CC = $(OPTCC)
AR = $(OPTAR)

Thereafter, we pass in the relevant values for those variables.

CPPFLAGS is reserved for flags destined for ONLY the preprocessor, and we don't
want to introduce for that reason.

-- 
Robin Hugh Johnson
Gentoo Linux: Developer, Trustee & Infrastructure Lead
E-Mail     : robbat2@xxxxxxxxxx
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]