head	1.13;
access;
symbols
	RELENG_2_2_8_RELEASE:1.7.2.1
	RELENG_2_2_7_RELEASE:1.7.2.1
	RELENG_2_2_6_RELEASE:1.7
	RELENG_2_2_5_RELEASE:1.7
	RELENG_2_2_2_RELEASE:1.7
	RELENG_2_2_1_RELEASE:1.7
	RELENG_2_2_0_RELEASE:1.7
	RELENG_2_1_7_RELEASE:1.6
	RELENG_2_1_6_1_RELEASE:1.6
	RELENG_2_1_6_RELEASE:1.6
	RELENG_2_2:1.7.0.2
	RELENG_2_2_BP:1.7
	RELENG_2_1_5_RELEASE:1.6
	RELENG_2_1_0_RELEASE:1.6
	RELENG_2_1_0:1.6.0.4
	RELENG_2_1_0_BP:1.6
	RELENG_2_0_5_RELEASE:1.6
	RELENG_2_0_5:1.6.0.2
	RELENG_2_0_5_BP:1.6
	RELENG_2_0_5_ALPHA:1.6;
locks; strict;
comment	@# @;


1.13
date	98.09.09.06.49.31;	author markm;	state dead;
branches;
next	1.12;

1.12
date	98.07.07.23.32.39;	author bde;	state Exp;
branches;
next	1.11;

1.11
date	98.05.29.06.16.44;	author jkh;	state Exp;
branches;
next	1.10;

1.10
date	98.05.12.22.51.34;	author jb;	state Exp;
branches;
next	1.9;

1.9
date	98.05.12.22.32.03;	author jb;	state Exp;
branches;
next	1.8;

1.8
date	96.12.23.20.21.33;	author phk;	state Exp;
branches;
next	1.7;

1.7
date	96.06.24.04.23.07;	author jkh;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	95.03.26.02.41.45;	author ache;	state Exp;
branches;
next	1.5;

1.5
date	95.03.25.17.14.11;	author jkh;	state Exp;
branches;
next	1.4;

1.4
date	95.03.25.15.43.57;	author bde;	state Exp;
branches;
next	1.3;

1.3
date	95.03.24.19.22.33;	author jkh;	state Exp;
branches;
next	1.2;

1.2
date	95.03.24.05.56.41;	author jkh;	state Exp;
branches;
next	1.1;

1.1
date	95.03.24.04.33.47;	author jkh;	state Exp;
branches;
next	;

1.7.2.1
date	98.05.29.06.17.00;	author jkh;	state Exp;
branches;
next	;


desc
@@


1.13
log
@Old Perl is leaving us. Goodbye, faithful friend.
@
text
@#	$Id: Makefile,v 1.12 1998/07/07 23:32:39 bde Exp $

PROG=	curseperl

# From perl
SRCS+= array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c
SRCS+= eval.c form.c hash.c perl.c perly.c regcomp.c regexec.c
SRCS+= stab.c str.c toke.c util.c

# Local to us.
SRCS+=	usersub.c curses.c

CFLAGS+=	-DDEBUGGING -I${.CURDIR}/../perl
LDADD+=         -lncurses -lmytinfo -lcrypt -lm
DPADD+=         ${LIBNCURSES} ${LIBMYTINFO} ${LIBCRYPT} ${LIBM}
CLEANFILES+=	curses.c
VPATH+=	${.CURDIR}/../perl
NOMAN=	yes

curses.c: curses.mus
	perl ${.CURDIR}/mus ${.CURDIR}/curses.mus > curses.c

.include "../../Makefile.inc"
.include <bsd.prog.mk>
@


1.12
log
@Use the installed version of perl for `make depend'.  It is now
bootstrapped by `make world'.  The version just built in ".."
normally won't work if the target system is not binary compatible.
The bootstrapped version has a better chance of working.

This makes the fixes and bugs in the previous 3 commits irrelevant.
Rev.1.11 was just wrong and rev.1.10 became unnecessary when
perl/perl was added to build-tools.  Don't expect to build perl/usub
without using `make world' or equivalent if you don't have perl
installed.
@
text
@d1 1
a1 1
#	$Id$
@


1.11
log
@Also check for Satoshi's TMPDIR location of perl when looking around for it.
Clean up an .ifdef which was probably doing the wrong thing in the case
where user wants to override PERL.
Submitted by:	jhay
@
text
@d1 2
a19 13
# If perl exists in none of these places, something is horribly wrong.
.if !defined(PERL)
.if exists(${.OBJDIR}/../../../../tmp/usr/bin/perl)
PERL=${.OBJDIR}/../../../../tmp/usr/bin/perl
.elif exists(${.OBJDIR}/../perl/perl)
PERL=${.OBJDIR}/../perl/perl
.elif exists(${.CURDIR}/../perl/perl)
PERL=${.CURDIR}/../perl/perl
.else
PERL=	${DESTDIR}/usr/bin/perl
.endif
.endif

d21 1
a21 1
	${PERL} ${.CURDIR}/mus ${.CURDIR}/curses.mus > curses.c
@


1.10
log
@If perl exists in OBJDIR it has just been built; if it exists in
CURDIR it has been built without an obj directory; however if it is in
neither of those places, we expect it to be in DESTDIR.

Yes Bruce, I know this is broken because the host is not supposed to be
the same as the target, but we need to get the hosted build working
properly first before even attempting a cross compiled operating
system build. That will need to concept of TOOLSDIR or something that
can be mapped to DESTDIR in the case of a hosted build and set to the
installed tools in a cross compiled build. Later, later, later!
@
text
@d19 4
a22 1
.if exists(${.OBJDIR}/../perl/perl)
d24 1
a24 1
.elif !defined(PERL) && exists(${.CURDIR}/../perl/perl)
d28 1
@


1.9
log
@Change .if to .elif to prevent the current directory path search for a
perl executable from overriding the object directory path search where
perl is most likely to be. Most people haven't seen this because it
defaulted to /usr/bin/perl which might be OK as a fallback, but when
bootstrapping a new version (or the *first* version on alpha), we don't
really want to use /usr/bin/perl.
@
text
@d24 1
a24 1
PERL=	/usr/bin/perl
@


1.8
log
@Remove a couple of private malloc() implementations, one of which
was unused afterall.
@
text
@d21 1
a21 2
.endif
.if !defined(PERL) && exists(${.CURDIR}/../perl/perl)
@


1.7
log
@Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src.  This is the final version of the
patches, incorporating the feedback I've received from -current.
@
text
@d5 1
a5 1
SRCS+= eval.c form.c hash.c malloc.c perl.c perly.c regcomp.c regexec.c
@


1.7.2.1
log
@MFC: ifdef cleanup.
@
text
@d19 1
a19 4
.if !defined(PERL)
.if exists(${.OBJDIR}/../../../../tmp/usr/bin/perl)
PERL=${.OBJDIR}/../../../../tmp/usr/bin/perl
.elif exists(${.OBJDIR}/../perl/perl)
d21 2
a22 1
.elif exists(${.CURDIR}/../perl/perl)
d25 1
a25 2
PERL=   ${DESTDIR}/usr/bin/perl
.endif
@


1.6
log
@Change wrong -ltermcap -ltermlib picked up to -lmytinfo
@
text
@d19 2
a20 2
.if exists(${.CURDIR}/../perl/obj/perl)
PERL=${.CURDIR}/../perl/obj/perl
@


1.5
log
@Get PERL found in any of its obvious locations.
@
text
@d12 2
a13 2
LDADD+= 	-lncurses -ltermcap -ltermlib -lcrypt -lm
DPADD+=		${LIBNCURSES} ${LIBTERMCAP} ${LIBTERMLIB} ${LIBCRYPT} ${LIBM}
@


1.4
log
@Don't attempt to fix the mode of mus - mus might be read-only.  Just
interpret it.  I've preserved the bugs that perl must be installed
to build part of perl and that it must be installed in the wrong place
(no ${DESTDIR}).
@
text
@d3 6
a8 5
SRCS+= array.c cmd.c cons.c consarg.c 
SRCS+= doarg.c doio.c dolist.c dump.c
SRCS+= eval.c form.c hash.c malloc.c 
SRCS+= perl.c perly.c regcomp.c regexec.c
SRCS+= stab.c str.c toke.c util.c 
d18 10
d29 1
a29 1
	/usr/bin/perl ${.CURDIR}/mus ${.CURDIR}/curses.mus > curses.c
@


1.3
log
@If mus script not executable, fix.
@
text
@d18 1
a18 2
	@@if [ ! -x ${.CURDIR}/mus ]; then chmod +x ${.CURDIR}/mus; fi
	${.CURDIR}/mus ${.CURDIR}/curses.mus > curses.c
@


1.2
log
@Adjust include paths.
@
text
@d18 1
@


1.1
log
@Bring back perl/usub as usub/, this time containing an updated curseperl
which is also installed by default (the reason for which should also be
plain shortly).
@
text
@d10 1
a10 1
CFLAGS+=	-DDEBUGGING -I${.CURDIR}/..
d14 1
a14 1
VPATH+=	${.CURDIR}/..
@
