texinfo breakage

Ruslan Ermilov ru at FreeBSD.org
Thu Jul 24 07:43:09 PDT 2003


On Fri, Jul 25, 2003 at 12:20:32AM +1000, Bruce Evans wrote:
> On Thu, 24 Jul 2003, Ruslan Ermilov wrote:
> 
[...]
> I think the full pathnames to sources in the makefiles are just style
> bugs except here.
> 
Yes.

> > So now we need to decide: do we want to support bogus SRCS with
> > paths in bsd.{prog,lib}.mk or not.  Previously, we only supported
> > it in bsd.lib.mk, but not in bsd.prog.mk.  Also, POSIX standard
> > suffix transformation rule for .c.o looks like this:
> >
> > .c.o:
> > 	${CC} ${CFLAGS} -c ${.IMPSRC}
> >
> > That is, no -o for cc(1).  We cannot fix POSIX rules, and if
> > we fix the non-POSIX rules in sys.mk (as shown in another
> > attached patch), the two sets of rules will differ even more.
> > OTOH, there's no harm in having these additional -o's in the
> > normal case of SRCS without path prefixes.  So, what do we
> > do with this?  Should I commit the attached patch to sys.mk,
> > or should I just fix this makefile to use another .c.o rule?
> 
> There is harm for the general case of sys.mk.  Apart from being
> incompatible with the POSIX rules, it is just wrong to build
> targets in the same directories as the sources in general.
> "-o ${.TARGET}" does this (${TARGET} for source .../foo.c is
> .../foo.o).
> 
Not quite.  If source is src/foo/bar.c, the object file will be
put in ${.OBJDIR}/src/foo/bar.c, and such a Makefile should
then take care of creating ${.OBJDIR}/src/foo, which libgmp/Makefile
in RELENG_4 does.

> I think sys.mk needs to use "-o ${.PREFIX}" or
> "-o ${.TARGET:T}" if it uses -o at all, although for .c.o this
> just gives the same behaviour including exposing bugs as not
> using -o.  Most or all of the current uses of "-o ${TARGET}"
> are wrong.
> 
Hm, that made me think.  ${.TARGET:T} is not the same as ${.TARGET}.
If source is foo/bar.c, then the .c.o rule should provide a command
to build its ${.TARGET}, foo/bar.o, not bar.o (${TARGET:T}), like
it currently does.

> Specialized makefiles can reasonably want to build objects outside
> of the object directory, but this is very un-[Free]BSD-makefile-like
> so I wouldn't want to support it in bsd.*.mk.
> 
I agree this is unnatural for BSD environment (actually, the objects
are built in a subdirectory of the object directory).  But by adding
these additional -o's we can support these cases, and also don't hurt
the normal case of canonical SRCS.

> I think it is mostly
> accidental that bsd.lib.mk has some support for it.
> 
Err, HAD some support.


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru at sunbay.com		Sunbay Software Ltd,
ru at FreeBSD.org		FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030724/2100bad5/attachment.bin


More information about the freebsd-ports mailing list