Subject: Re: strange (make?) problem with MKUUCP=no and tip(1)
To: None <tech-toolchain@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: tech-toolchain
Date: 04/08/2006 13:26:48
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Jukka Salmi --> tech-toolchain (2006-04-08 11:59:24 +0200):
> Hi,
> 
> I just tried to build a distribution with MKUUCP set to `no'. This
> failed because ${DESTDIR}/usr/bin/cu was installed (as a link to
> ${DESTDIR}/usr/bin/tip) but missing from the flist. IIUC cu should not
> be installed at all if MKUUCP=no.
> 
> src/usr.bin/tip/Makefile has:
> 
> .if !defined(MKUUCP) || ${MKUUCP} != no
> LINKS=	${BINDIR}/tip ${BINDIR}/cu
> MLINKS=	tip.1 cu.1
> .endif
> 
> which looks fine to me, but make(1) doesn't seem to get it right:
> 
> $ cd /usr/src/usr.bin/tip
> $ /opt/tools/i386/bin/nbmake-i386 -V MKUUCP
> no
> $ /opt/tools/i386/bin/nbmake-i386 -V LINKS
> ${BINDIR}/tip ${BINDIR}/cu
> 
> Strange, LINKS should be empty here, shouldn't it? If I set MKUUCP on
> the commandline this works as expected:
> 
> $ /opt/tools/i386/bin/nbmake-i386 MKUUCP=no -V LINKS
> 
> $ 
> 
> `make -dA' prints:
> 
> [...]
> Global:WARNS = 4
> Global:PROG = tip
> lhs = "", rhs = "no", op = !=
> Global:LINKS = ${BINDIR}/tip ${BINDIR}/cu
> Global:MLINKS = tip.1 cu.1
> [...]
> 
> So, where's the bug? Or am I missing something?

It's a bug in the tip makefile: bsd.own.mk is not included (see attached
patch). Should I send a PR?


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~

--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: usr.bin/tip/Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/src/usr.bin/tip/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- usr.bin/tip/Makefile	5 Apr 2006 13:04:33 -0000	1.25
+++ usr.bin/tip/Makefile	8 Apr 2006 11:20:58 -0000
@@ -25,6 +25,8 @@
 #	BUFSIZ			buffer sizing from stdio, must be fed
 #				explicitly to remcap.c if not 1024
 
+.include <bsd.own.mk>
+
 WARNS=4
 PROG=	tip
 .if !defined(MKUUCP) || ${MKUUCP} != no

--YiEDa0DAkWCtVeE4--