From owner-cvs-all Tue Aug 18 08:01:54 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA00325 for cvs-all-outgoing; Tue, 18 Aug 1998 08:01:54 -0700 (PDT) (envelope-from owner-cvs-all) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA00313; Tue, 18 Aug 1998 08:01:44 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id BAA12271; Wed, 19 Aug 1998 01:01:03 +1000 Date: Wed, 19 Aug 1998 01:01:03 +1000 From: Bruce Evans Message-Id: <199808181501.BAA12271@godzilla.zeta.org.au> To: bde@FreeBSD.ORG, dag-erli@ifi.uio.no Subject: Re: cvs commit: src/lib/libfetch Makefile Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> 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