Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Apr 1995 19:33:15 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        charnier@lirmm.fr, hackers@FreeBSD.org
Subject:   Re: pb using maninstall
Message-ID:  <199504230933.TAA25575@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>/usr/src/gnu/usr.bin/ld is particular because it contains a PROG (ld) 
>and contains subdirs containing others PROGs (ldconfig, ldd, rtld).

>I tried the following (BUT FAILED) because maninstall go into subdirs and 
>current dir but install don't see current dir.

>diff -c -r1.16 Makefile
>  ...
>+ .include <bsd.subdir.mk>

>Is .../usr.bin/ld a <bsd.subdir.mk> or a <bsd.prog.mk>? That is the question.

It is both.  bsd.prog.mk is supposed to handle this, and does handle it
for other targets.  The handling is not quite right.  E.g., if you run
`make -k install' in /usr/src/gnu/usr.bin/ld and there is an error, then
the subdirs are not entered.  I often get this error when I run `make -k
install' with an nfs mounted /usr.  I want this to install only to
directories on the root partition and continue after access errors on
the /usr partition.  It works except /sbin/ld.so doesn't get installed
because the rtld subdir doesn't get entered.

>The correct solution (IMHO) will be to create .../usr.bin/ld/ld and to
>deprecate .../usr.bin/ld as a <bsd.prog.mk> dir.

I like the existing layout.  Someone should fix bsd.prog.mk.  I think
it is easy to add the maninstall rule by copying an existing rule.

>I found a typo in bsd.prog.mk, see below

>.if defined(PROG)
>.if defined(SRCS)

>.else defined(PROG)             <---- should be .else defined(SRCS)

Shouldn't it be `.else !defined(SRCS)? :-)

>SRCS=   ${PROG}.c
>.endif

>.if     !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
>        !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
>        !defined(MAN7) && !defined(MAN8) && !defined(NOMAN)
>MAN1=   ${PROG}.1
>.endif
>.endif

It's hard to see which ifdefs the endifs correspond too.  None of the
endifs in /usr/src/share/mk/*.mk is commented, although "comments" seem
work due to design bugs the same as in traditional C:

.ifdef FOO
.else !FOO
.endif FOO (Gnu standard)

but also

.ifdef FOO
.else WRONG
.endif :-( garbage :-(

Bruce



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