Subject: Make uses .PATH on targets as well
To: None <current-users@NetBSD.ORG>
From: Martin Husemann <>
List: current-users
Date: 05/18/1997 11:51:35
I don't know if this came up with the recent make/Makefile changes;
maybe I just didn't notice it before:

I have a custom version of pppd, which I build using most of the stock
pppd, replacing sys-bsd.c with my own version. To do this I create an
empty directory and copy sys-isdn.c and the appended makefile there,
then do "make" and "make install".

This works fine when /usr/src/usr.sbin/pppd/pppd is "clean", but today I
happend to have the result of building the world lying around there - and
now "make" in /tmp/pppd picked up /usr/src/usr.sbin/pppd/pppd/pppd as the 
target when making pppd, and "make install" took it from there too.

That's fine, but this silently overwrote my stock pppd with the isdn version,
and a "make install" in /usr/src would now install the isdn version as the
stock one.

Any chance I can avoid this? Is this a bug in make? I would suggest make
should ignore .PATH when expanding rule targets.


#	This is a modified version of:
#	$NetBSD: Makefile,v 1.18 1997/05/11 01:06:01 christos Exp $
#	from /usr/src/usr.sbin/pppd/pppd.

# -------------------- ATTENTION: ----------------------------------
# In order to reuse as much of the default system distribution of
# pppd as possible, we use most sources directly from their system
# source directory ($PPPDIR below). This might pick up objects and
# binaries as well, so you better do a "make cleandir" in $PPPDIR
# before compiling and installing the ISDN version of pppd!
# ------------------------------------------------------------------

# You have to adjust the following path definitions:

# This forces the netmask to be, which you
# probably always want on ISDN links (or it's a don't care)
# and overrides the negotiated netmask. Comment this line if
# you want the 'normal' pppd behaviour.

# This leaves a default route on after closing the ppp link,
# so the link is braught back up on next usage

# We install in /usr/local/lib/bisdn as pppd.isdn
BINDIR=		/usr/local/lib/bisdn
PROGNAME=	pppd.isdn

# No additional documentation - it's the same as system stock
# installed manual anyway

# Now you should be able to do "make depend && make" and get
# a modified version of pppd, which will work with BISDN.

PROG=	pppd
SRCS=	auth.c cbcp.c ccp.c chap.c chap_ms.c demand.c fsm.c ipcp.c \
	ipxcp.c lcp.c magic.c main.c options.c sys-isdn.c upap.c

BINOWN=	root

LDADD=	-lpcap -lcrypt -lutil
#CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Dlint

.include <>