Source-Changes-D archive

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

Re: CVS commit: src/external/public-domain/sqlite/lib



On Fri, Mar 07, 2014 at 07:28:09PM +0000, Christos Zoulas wrote:
> In article <12922.1394219900%splode.eterna.com.au@localhost>,
> matthew green  <mrg%eterna.com.au@localhost> wrote:
> >
> >"Christos Zoulas" writes:
> >> Module Name:       src
> >> Committed By:      christos
> >> Date:              Fri Mar  7 18:37:48 UTC 2014
> >> 
> >> Modified Files:
> >>    src/external/public-domain/sqlite/lib: Makefile
> >> 
> >> Log Message:
> >> change CC to HOST_CC to avoid trying to find <stdarg.h> in an unpopulated
> >> DSTDIR.
> >
> >won't this find the version of <sqlite3.h> on the host?
> >it seems "saner" to elide this rule in the case that say
> >!exists(${DESTDIR}/usr/include/stdarg.h) or something else
> >ugly, until you figure out why it is being executed in the
> >build too early.
> 
> No, because there is a -I pointing to the directory that contains it.

Think I'd do
sqlite3.pc: ${SRCDIR}/sqlite3.h sqlite3.pc.in
        @(V=$$( (echo '#include <sqlite3.h>'; echo "@@@ SQLITE_VERSION @@@") | \
           ${CC} -E -I${SRCDIR} - | tail -1 | tr -d '"') && \
           ${HOST_CC} -E -I${SRCDIR} - | grep '@@@' | tr -d '" @') && \
           ${TOOL_SED} -e "s/@VERSION@/$$V/" < ${.CURDIR}/sqlite3.pc.in \
           > ${.TARGET})

That would be safer.
Although you might want to remove the target file on failure.
Or maybe change the last line to:
           > ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET}

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index