Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 1998 01:01:03 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@FreeBSD.ORG, dag-erli@ifi.uio.no
Cc:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libfetch Makefile
Message-ID:  <199808181501.BAA12271@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>   Made this actually work when there's an object directory:
>>   - replaced bogus dependencies of distribution sources on generated
>>     sources by the same ones that bsd.lib.mk would generate if it knew
>>     all the sources.  We shoot ourself in the foot by not naming the
>>     generated (included) sources *.h, so we can just put the generated
>>     sources in SRCS.
>>   - replaced -I${.CURDIR} by `-I.'.  Here `.' is an alias for ${.OBJDIR}.
>>     -I${.CURDIR} didn't do anything, since ${.CURDIR} is the default in
>>     all cases here (it would be necessary for ""-style includes made from
>>     sources in ${.OBJDIR}.

>All these bugs (or most of them) also exist in lib/libftpio/Makefile,
>which I used as template.

No, libftpio is quite different (more normal):
- no bogus dependencies of distribution sources on generated sources.
  The generated source is compiled directly (not #included) so just
  putting it in SRCS works right.
- the generated source (in ${.OBJDIR}) includes headers from ${.CURDIR}
  so -I${.CURDIR} is neccessary if ${.OBJDIR} != ${.CURDIR}.  Nothing is
  included from ${.OBJDIR} so -I. would be bogus.

For another example of how not to do things, see libedit.  It concatenates
most the C files into ${.OBJDIR}/editline.c.  This breaks automatic
generation of dependencies, so the makefile has to be very verbose.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808181501.BAA12271>