aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile29
-rw-r--r--bin/ed/test/Makefile4
-rw-r--r--bin/sh/Makefile4
-rwxr-xr-xbin/sh/mkbuiltins10
-rw-r--r--eBones/Makefile.inc26
-rw-r--r--eBones/lib/libkadm/Makefile3
-rw-r--r--eBones/lib/libkrb/Makefile3
-rw-r--r--games/fortune/datfiles/Makefile8
-rw-r--r--gnu/lib/libgmp/tests/Makefile4
-rw-r--r--gnu/libexec/uucp/Makefile.inc12
-rw-r--r--gnu/usr.bin/as/Makefile6
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile20
-rw-r--r--gnu/usr.bin/cc/Makefile.inc6
-rw-r--r--gnu/usr.bin/cvs/Makefile.inc4
-rw-r--r--gnu/usr.bin/gdb/gdb/Makefile20
-rw-r--r--gnu/usr.bin/groff/Makefile.cfg14
-rw-r--r--gnu/usr.bin/man/lib/Makefile4
-rw-r--r--gnu/usr.bin/man/man/Makefile10
-rw-r--r--gnu/usr.bin/man/manpath/Makefile10
-rw-r--r--gnu/usr.bin/perl/usub/Makefile4
-rw-r--r--gnu/usr.bin/rcs/Makefile.inc4
-rw-r--r--gnu/usr.bin/send-pr/Makefile2
-rw-r--r--gnu/usr.bin/texinfo/doc/Makefile4
-rw-r--r--lib/Makefile2
-rw-r--r--lib/libss/Makefile6
-rw-r--r--release/floppies/boot/floppy/Makefile11
-rw-r--r--secure/lib/libcrypt/test/Makefile10
-rw-r--r--secure/usr.bin/bdes/Makefile6
-rw-r--r--share/colldef/Makefile6
-rw-r--r--share/doc/psd/19.curses/Makefile4
-rw-r--r--share/man/man4/Makefile2
-rw-r--r--share/man/man8/Makefile2
-rw-r--r--share/mk/Makefile4
-rw-r--r--share/mk/bsd.dep.mk34
-rw-r--r--share/mk/bsd.doc.mk26
-rw-r--r--share/mk/bsd.info.mk39
-rw-r--r--share/mk/bsd.kmod.mk32
-rw-r--r--share/mk/bsd.lib.mk57
-rw-r--r--share/mk/bsd.obj.mk99
-rw-r--r--share/mk/bsd.own.mk16
-rw-r--r--share/mk/bsd.port.mk31
-rw-r--r--share/mk/bsd.prog.mk61
-rw-r--r--share/mk/bsd.sgml.mk6
-rw-r--r--share/mklocale/Makefile6
-rw-r--r--share/zoneinfo/Makefile6
-rw-r--r--sys/conf/kmod.mk32
-rw-r--r--usr.bin/colldef/data/Makefile6
-rw-r--r--usr.bin/make/main.c33
-rw-r--r--usr.bin/make/pathnames.h4
-rw-r--r--usr.bin/mklocale/data/Makefile6
-rw-r--r--usr.bin/sgmls/Makefile.inc6
-rw-r--r--usr.bin/tip/tip/Makefile4
-rw-r--r--usr.bin/tn3270/mset/Makefile4
-rw-r--r--usr.bin/tn3270/tn3270/Makefile16
-rw-r--r--usr.sbin/cron/cron/Makefile6
-rw-r--r--usr.sbin/cron/crontab/Makefile6
-rw-r--r--usr.sbin/mrouted/map-mbone/Makefile8
-rw-r--r--usr.sbin/mrouted/mrinfo/Makefile8
-rw-r--r--usr.sbin/mrouted/mrouted/Makefile8
-rw-r--r--usr.sbin/mrouted/mtrace/Makefile8
-rw-r--r--usr.sbin/pcvt/kbdio/Makefile2
-rw-r--r--usr.sbin/pcvt/kcon/Makefile2
-rw-r--r--usr.sbin/pcvt/vgaio/Makefile2
-rw-r--r--usr.sbin/pkg_install/add/Makefile6
-rw-r--r--usr.sbin/pkg_install/create/Makefile6
-rw-r--r--usr.sbin/pkg_install/delete/Makefile6
-rw-r--r--usr.sbin/pkg_install/info/Makefile6
-rw-r--r--usr.sbin/sup/sup/Makefile6
-rw-r--r--usr.sbin/sup/supfilesrv/Makefile6
-rw-r--r--usr.sbin/sup/supscan/Makefile6
-rw-r--r--usr.sbin/xntpd/authstuff/Makefile8
-rw-r--r--usr.sbin/xntpd/ntpdate/Makefile8
-rw-r--r--usr.sbin/xntpd/ntpq/Makefile8
-rw-r--r--usr.sbin/xntpd/ntptrace/Makefile8
-rw-r--r--usr.sbin/xntpd/parse/util/Makefile8
-rw-r--r--usr.sbin/xntpd/util/Makefile8
-rw-r--r--usr.sbin/xntpd/xntpd/Makefile14
-rw-r--r--usr.sbin/xntpd/xntpdc/Makefile8
78 files changed, 367 insertions, 583 deletions
diff --git a/Makefile b/Makefile
index 23a0326f82bb..89ff70cd7fea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.83 1996/06/20 18:47:04 jkh Exp $
+# $Id: Makefile,v 1.84 1996/06/22 17:58:44 pst Exp $
#
# Make command line options:
# -DCLOBBER will remove /usr/include
@@ -112,7 +112,7 @@ world: pre-world hierarchy mk $(WORLD_CLEANDIST) bootstrap include-tools include
@echo " Rebuilding ${DESTDIR} The whole thing"
@echo "--------------------------------------------------------------"
@echo
- ${MAKE} depend all install
+ cd ${.CURDIR} && ${MAKE} depend all install
cd ${.CURDIR}/share/man && ${MAKE} makedb
.if target(post-world)
cd ${.CURDIR} && ${MAKE} post-world
@@ -132,7 +132,7 @@ reinstall: hierarchy mk includes
@echo " Reinstall ${DESTDIR} The whole thing"
@echo "--------------------------------------------------------------"
@echo
- ${MAKE} install
+ cd ${.CURDIR} && ${MAKE} install
cd ${.CURDIR}/share/man && ${MAKE} makedb
hierarchy:
@@ -166,25 +166,8 @@ cleandist:
@echo "--------------------------------------------------------------"
@echo " Cleaning up the source tree, and rebuilding the obj tree"
@echo "--------------------------------------------------------------"
- @echo
- here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
- if test -d /usr/obj -a ! -d $$dest; then \
- mkdir -p $$dest; \
- else \
- true; \
- fi; \
- cd $$dest && rm -rf ${SUBDIR}
- find . -name obj | xargs rm -rf
-.if defined(MAKE_LOCAL) & exists(local) & exists(local/Makefile)
- # The cd is done as local may well be a symbolic link
- -cd local && find . -name obj | xargs rm -rf
-.endif
-.if defined(MAKE_PORTS) & exists(ports) & exists(ports/Makefile)
- # The cd is done as local may well be a symbolic link
- -cd ports && find . -name obj | xargs rm -rf
-.endif
- ${MAKE} cleandir
- ${MAKE} obj
+ cd ${.CURDIR} && ${MAKE} cleandir
+ cd ${.CURDIR} && ${MAKE} obj
.endif
installmost:
@@ -229,7 +212,7 @@ mk:
@echo "--------------------------------------------------------------"
@echo " Rebuilding ${DESTDIR}/usr/share/mk"
@echo "--------------------------------------------------------------"
- cd ${.CURDIR}/share/mk && ${MAKE} install
+ cd ${.CURDIR}/share/mk && ${MAKE} install
includes:
@echo "--------------------------------------------------------------"
diff --git a/bin/ed/test/Makefile b/bin/ed/test/Makefile
index 9f10e1e3c225..08f0dcd9fffa 100644
--- a/bin/ed/test/Makefile
+++ b/bin/ed/test/Makefile
@@ -1,7 +1,7 @@
-# $Id$
+# $Id: Makefile,v 1.5 1994/09/24 02:55:35 davidg Exp $
SHELL= /bin/sh
-ED= ../obj/ed
+ED= ${.OBJDIR}/ed
all: check
@:
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 37a3d9567921..cacba417decf 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/8/93
-# $Id: Makefile,v 1.9 1996/02/03 13:27:54 joerg Exp $
+# $Id: Makefile,v 1.11 1996/06/02 17:06:39 phk Exp $
PROG= sh
SRCS= alias.c builtins.c cd.c echo.c error.c eval.c exec.c expand.c \
@@ -27,7 +27,7 @@ ${.CURDIR}/builtins:
# just override the default rule
builtins.h builtins.c: ${.CURDIR}/mkbuiltins ${.CURDIR}/builtins
- cd ${.CURDIR}; sh mkbuiltins
+ cd ${.CURDIR} && env OBJDIR=${.OBJDIR} sh mkbuiltins
init.c: mkinit ${SRCS}
./mkinit '${CC} -c ${CFLAGS} ${LDFLAGS} init.c' ${.ALLSRC}
diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins
index e7f0d8dbbdf2..104ded646449 100755
--- a/bin/sh/mkbuiltins
+++ b/bin/sh/mkbuiltins
@@ -35,15 +35,15 @@
# SUCH DAMAGE.
#
# @(#)mkbuiltins 8.1 (Berkeley) 5/31/93
-# $Id: mkbuiltins,v 1.2 1994/09/24 02:57:53 davidg Exp $
+# $Id: mkbuiltins,v 1.3 1995/03/30 19:45:20 phk Exp $
temp=/tmp/ka$$
havejobs=0
if grep '^#define JOBS[ ]*1' shell.h > /dev/null
then havejobs=1
fi
-if [ -d obj ] ; then
- exec > obj/builtins.c
+if [ -d ${OBJDIR} ] ; then
+ exec > ${OBJDIR}/builtins.c
else
exec > builtins.c
fi
@@ -71,8 +71,8 @@ awk '{ for (i = 2 ; i <= NF ; i++) {
echo ' NULL, 0
};'
-if [ -d obj ] ; then
- exec > obj/builtins.h
+if [ -d ${OBJDIR} ] ; then
+ exec > ${OBJDIR}/builtins.h
else
exec > builtins.h
fi
diff --git a/eBones/Makefile.inc b/eBones/Makefile.inc
index 8ea27113c5b5..8d37845d3a14 100644
--- a/eBones/Makefile.inc
+++ b/eBones/Makefile.inc
@@ -1,40 +1,40 @@
# From: @(#)Makefile.inc 5.1 (Berkeley) 6/25/90
-# $Id$
+# $Id: Makefile.inc,v 1.10 1996/02/11 08:51:47 markm Exp $
DISTRIBUTION= krb
-.if exists(${.CURDIR}/../../../secure/lib/libdes/obj)
-DESOBJDIR= ${.CURDIR}/../../../secure/lib/libdes/obj
+.if exists(${.OBJDIR}/../../../secure/lib/libdes)
+DESOBJDIR= ${.OBJDIR}/../../../secure/lib/libdes
.else
DESOBJDIR= ${.CURDIR}/../../../secure/lib/libdes
.endif
-.if exists(${.CURDIR}/../../lib/libkrb/obj)
-KRBOBJDIR= ${.CURDIR}/../../lib/libkrb/obj
+.if exists(${.OBJDIR}/../../lib/libkrb)
+KRBOBJDIR= ${.OBJDIR}/../../lib/libkrb
.else
KRBOBJDIR= ${.CURDIR}/../../lib/libkrb
.endif
-.if exists(${.CURDIR}/../../lib/libkdb/obj)
-KDBOBJDIR= ${.CURDIR}/../../lib/libkdb/obj
+.if exists(${.OBJDIR}/../../lib/libkdb)
+KDBOBJDIR= ${.CURDIR}/../../lib/libkdb
.else
KDBOBJDIR= ${.CURDIR}/../../lib/libkdb
.endif
-.if exists(${.CURDIR}/../../lib/libacl/obj)
-ACLOBJDIR= ${.CURDIR}/../../lib/libacl/obj
+.if exists(${.OBJDIR}/../../lib/libacl)
+ACLOBJDIR= ${.OBJDIR}/../../lib/libacl
.else
ACLOBJDIR= ${.CURDIR}/../../lib/libacl
.endif
-.if exists(${.CURDIR}/../../lib/libkadm/obj)
-KADMOBJDIR= ${.CURDIR}/../../lib/libkadm/obj
+.if exists(${.OBJDIR}/../../lib/libkadm)
+KADMOBJDIR= ${.OBJDIR}/../../lib/libkadm
.else
KADMOBJDIR= ${.CURDIR}/../../lib/libkadm
.endif
-.if exists(${.CURDIR}/../../lib/librkinit/obj)
-RKINITOBJDIR= ${.CURDIR}/../../lib/librkinit/obj
+.if exists(${.OBJDIR}/../../lib/librkinit)
+RKINITOBJDIR= ${.OBJDIR}/../../lib/librkinit
.else
RKINITOBJDIR= ${.CURDIR}/../../lib/librkinit
.endif
diff --git a/eBones/lib/libkadm/Makefile b/eBones/lib/libkadm/Makefile
index 955cc2ae40c1..e536feb2c967 100644
--- a/eBones/lib/libkadm/Makefile
+++ b/eBones/lib/libkadm/Makefile
@@ -1,5 +1,5 @@
# From: @(#)Makefile 5.1 (Berkeley) 6/25/90
-# $Id: Makefile,v 1.8 1995/09/15 06:20:23 gibbs Exp $
+# $Id: Makefile,v 1.9 1995/11/12 08:13:10 markm Exp $
LIB= kadm
@@ -19,5 +19,4 @@ beforeinstall: kadm_err.c
.include <bsd.lib.mk>
kadm_err.c: ${KADMOBJDIR}/kadm_err.h
-
kadm_cli_wrap.o: ${KRBOBJDIR}/krb_err.h
diff --git a/eBones/lib/libkrb/Makefile b/eBones/lib/libkrb/Makefile
index 02aecaf6dac9..a78f0dd93e97 100644
--- a/eBones/lib/libkrb/Makefile
+++ b/eBones/lib/libkrb/Makefile
@@ -1,5 +1,5 @@
# From: @(#)Makefile 5.1 (Berkeley) 6/25/90
-# $Id: Makefile,v 1.11 1995/10/06 17:37:54 gibbs Exp $
+# $Id: Makefile,v 1.12 1995/11/12 08:13:21 markm Exp $
LIB= krb
SHLIB_MINOR= 1
@@ -52,4 +52,3 @@ MLINKS+=tf_util.3 tf_init.3 tf_util.3 tf_get_pname.3 \
.include <bsd.lib.mk>
krb_err.c: ${KRBOBJDIR}/krb_err.h
-
diff --git a/games/fortune/datfiles/Makefile b/games/fortune/datfiles/Makefile
index d3962d9e6357..5d585fab45c5 100644
--- a/games/fortune/datfiles/Makefile
+++ b/games/fortune/datfiles/Makefile
@@ -15,16 +15,16 @@ TYPE= real
# THE FOURTH LINE
#TYPE= fake
-.if exists(${.CURDIR}/../../caesar/obj/caesar)
-CAESAR=${.CURDIR}/../../caesar/obj/caesar
+.if exists(${.OBJDIR}/../../caesar/caesar)
+CAESAR=${.OBJDIR}/../../caesar/caesar
.elif exists(${.CURDIR}/../../caesar/caesar)
CAESAR=${.CURDIR}/../../caesar/caesar
.else
CAESAR=/usr/games/caesar
.endif
-.if exists(${.CURDIR}/../strfile/obj/strfile)
-STRFILE=${.CURDIR}/../strfile/obj/strfile
+.if exists(${.OBJDIR}/../strfile/strfile)
+STRFILE=${.OBJDIR}/../strfile/strfile
.elif exists(${.CURDIR}/../strfile/strfile)
STRFILE=${.CURDIR}/../strfile/strfile
.else
diff --git a/gnu/lib/libgmp/tests/Makefile b/gnu/lib/libgmp/tests/Makefile
index 9d62bf6fe3d0..06a6749b0f68 100644
--- a/gnu/lib/libgmp/tests/Makefile
+++ b/gnu/lib/libgmp/tests/Makefile
@@ -18,13 +18,13 @@
# along with the GNU MP Library; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-.PATH: ${.CURDIR}/.. ${.CURDIR}/../obj ${.CURDIR}/../libgmp/obj
+.PATH: ${.CURDIR}/.. ${.OBJDIR} ${.OBJDIR}/../libgmp
CC = gcc
TEST_LIBS = -lgmp
OPT = -O -g
-CFLAGS = -I${.CURDIR} -I${.CURDIR}/.. -I${.CURDIR}/../obj -I${.CURDIR}/../libgmp -I${.CURDIR}/../libgmp/obj $(OPT)
+CFLAGS = -I${.CURDIR} -I${.CURDIR}/.. -I${.OBJDIR}/.. -I${.CURDIR}/../libgmp -I${.OBJDIR}/../libgmp $(OPT)
TEST_SRCS = tst-mul.c tst-dm.c tst-dm_ui.c tst-mdm.c tst-mdm_ui.c tst-gcd.c \
tst-sqrtrem.c tst-convert.c
diff --git a/gnu/libexec/uucp/Makefile.inc b/gnu/libexec/uucp/Makefile.inc
index ab88f3ed2c33..02c21855d7ad 100644
--- a/gnu/libexec/uucp/Makefile.inc
+++ b/gnu/libexec/uucp/Makefile.inc
@@ -1,17 +1,17 @@
-.if exists(${.CURDIR}/../libunix/obj)
-LIBUNIX= $(.CURDIR)/../libunix/obj/libunix.a
+.if exists(${.OBJDIR}/../libunix)
+LIBUNIX= $(.OBJDIR)/../libunix/libunix.a
.else
LIBUNIX= $(.CURDIR)/../libunix/libunix.a
.endif
-.if exists(${.CURDIR}/../libuuconf/obj)
-LIBUUCONF= $(.CURDIR)/../libuuconf/obj/libuuconf.a
+.if exists(${.OBJDIR}/../libuuconf)
+LIBUUCONF= $(.OBJDIR)/../libuuconf/libuuconf.a
.else
LIBUUCONF= $(.CURDIR)/../libuuconf/libuuconf.a
.endif
-.if exists(${.CURDIR}/../libuucp/obj)
-LIBUUCP= $(.CURDIR)/../libuucp/obj/libuucp.a
+.if exists(${.OBJDIR}/../libuucp)
+LIBUUCP= $(.OBJDIR)/../libuucp/libuucp.a
.else
LIBUUCP= $(.CURDIR)/../libuucp/libuucp.a
.endif
diff --git a/gnu/usr.bin/as/Makefile b/gnu/usr.bin/as/Makefile
index 50e4ac8cad08..908501d5edba 100644
--- a/gnu/usr.bin/as/Makefile
+++ b/gnu/usr.bin/as/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 6.1 (Berkeley) 3/3/91
-# $Id: Makefile,v 1.8 1995/05/30 04:45:55 rgrimes Exp $
+# $Id: Makefile,v 1.9 1995/09/22 14:14:12 phk Exp $
.include "config/Makefile.$(MACHINE)"
@@ -13,9 +13,7 @@ gas_target=$(MACHINE)
gas_objformat=aout
.endif
-.if exists(${.CURDIR}/obj)
-ADDINCLUDE=-I${.CURDIR}/obj
-.endif
+ADDINCLUDE=-I${.OBJDIR}
PROG= as
SRCS+= app.c as.c atof-generic.c bignum-copy.c \
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile
index 942a967a975d..716789e4d4d3 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile
+++ b/gnu/usr.bin/binutils/gdb/Makefile
@@ -1,4 +1,4 @@
-# $Id: $
+# $Id: Makefile,v 1.12 1996/05/07 23:15:24 wosch Exp $
PROG = gdb
BINDIR= /usr/bin
@@ -50,25 +50,25 @@ CFLAGS+= -I$(.CURDIR)/. -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd
DPADD+= ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
LDADD+= -lreadline -ltermcap -lgnuregex
-.if exists(${.CURDIR}/../libiberty/obj)
-LDADD+= -L${.CURDIR}/../libiberty/obj -liberty
-DPADD+= ${.CURDIR}/../libiberty/obj/libiberty.a
+.if exists(${.OBJDIR}/../libiberty)
+LDADD+= -L${.OBJDIR}/../libiberty -liberty
+DPADD+= ${.OBJDIR}/../libiberty/libiberty.a
.else
LDADD+= -L${.CURDIR}/../libiberty/ -liberty
DPADD+= ${.CURDIR}/../libiberty/libiberty.a
.endif
-.if exists(${.CURDIR}/../bfd/obj)
-LDADD+= -L${.CURDIR}/../bfd/obj -lbfd
-DPADD+= ${.CURDIR}/../bfd/obj/libbfd.a
+.if exists(${.OBJDIR}/../bfd)
+LDADD+= -L${.OBJDIR}/../bfd -lbfd
+DPADD+= ${.OBJDIR}/../bfd/libbfd.a
.else
LDADD+= -L${.CURDIR}/../bfd/ -lbfd
DPADD+= ${.CURDIR}/../bfd/libbfd.a
.endif
-.if exists(${.CURDIR}/../mmalloc/obj)
-LDADD+= -L${.CURDIR}/../mmalloc/obj -lmmalloc
-DPADD+= ${.CURDIR}/../mmalloc/obj/libmmalloc.a
+.if exists(${.OBJDIR}/../mmalloc)
+LDADD+= -L${.OBJDIR}/../mmalloc -lmmalloc
+DPADD+= ${.OBJDIR}/../mmalloc/libmmalloc.a
.else
LDADD+= -L${.CURDIR}/../mmalloc/ -lmmalloc
DPADD+= ${.CURDIR}/../mmalloc/libmmalloc.a
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index 16d12bf87b03..bb32603a6e44 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.inc,v 1.12 1995/03/10 19:39:32 davidg Exp $
+# $Id: Makefile.inc,v 1.13 1995/03/11 03:48:42 nate Exp $
#
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../include
@@ -15,8 +15,8 @@ CFLAGS+= -DHAVE_PUTENV
CFLAGS+= -DGCC_NAME=\"cc\"
CFLAGS+= -DLINK_LIBGCC_SPECIAL_1
-.if exists(${.CURDIR}/../cc_int/obj)
-LIBDESTDIR= ${.CURDIR}/../cc_int/obj
+.if exists(${.OBJDIR}/../cc_int)
+LIBDESTDIR= ${.OBJDIR}/../cc_int
.else
LIBDESTDIR= ${.CURDIR}/../cc_int
.endif
diff --git a/gnu/usr.bin/cvs/Makefile.inc b/gnu/usr.bin/cvs/Makefile.inc
index 9c26b861cf8a..c153243aa90f 100644
--- a/gnu/usr.bin/cvs/Makefile.inc
+++ b/gnu/usr.bin/cvs/Makefile.inc
@@ -1,5 +1,5 @@
-.if exists(${.CURDIR}/../lib/obj)
-LIBDESTDIR= ${.CURDIR}/../lib/obj
+.if exists(${.OBJDIR}/../lib)
+LIBDESTDIR= ${.OBJDIR}/../lib
.else
LIBDESTDIR= ${.CURDIR}/../lib
.endif
diff --git a/gnu/usr.bin/gdb/gdb/Makefile b/gnu/usr.bin/gdb/gdb/Makefile
index 942a967a975d..716789e4d4d3 100644
--- a/gnu/usr.bin/gdb/gdb/Makefile
+++ b/gnu/usr.bin/gdb/gdb/Makefile
@@ -1,4 +1,4 @@
-# $Id: $
+# $Id: Makefile,v 1.12 1996/05/07 23:15:24 wosch Exp $
PROG = gdb
BINDIR= /usr/bin
@@ -50,25 +50,25 @@ CFLAGS+= -I$(.CURDIR)/. -I${DESTDIR}/usr/include/readline -I$(.CURDIR)/../bfd
DPADD+= ${LIBREADLINE} ${LIBTERMCAP} ${LIBGNUREGEX}
LDADD+= -lreadline -ltermcap -lgnuregex
-.if exists(${.CURDIR}/../libiberty/obj)
-LDADD+= -L${.CURDIR}/../libiberty/obj -liberty
-DPADD+= ${.CURDIR}/../libiberty/obj/libiberty.a
+.if exists(${.OBJDIR}/../libiberty)
+LDADD+= -L${.OBJDIR}/../libiberty -liberty
+DPADD+= ${.OBJDIR}/../libiberty/libiberty.a
.else
LDADD+= -L${.CURDIR}/../libiberty/ -liberty
DPADD+= ${.CURDIR}/../libiberty/libiberty.a
.endif
-.if exists(${.CURDIR}/../bfd/obj)
-LDADD+= -L${.CURDIR}/../bfd/obj -lbfd
-DPADD+= ${.CURDIR}/../bfd/obj/libbfd.a
+.if exists(${.OBJDIR}/../bfd)
+LDADD+= -L${.OBJDIR}/../bfd -lbfd
+DPADD+= ${.OBJDIR}/../bfd/libbfd.a
.else
LDADD+= -L${.CURDIR}/../bfd/ -lbfd
DPADD+= ${.CURDIR}/../bfd/libbfd.a
.endif
-.if exists(${.CURDIR}/../mmalloc/obj)
-LDADD+= -L${.CURDIR}/../mmalloc/obj -lmmalloc
-DPADD+= ${.CURDIR}/../mmalloc/obj/libmmalloc.a
+.if exists(${.OBJDIR}/../mmalloc)
+LDADD+= -L${.OBJDIR}/../mmalloc -lmmalloc
+DPADD+= ${.OBJDIR}/../mmalloc/libmmalloc.a
.else
LDADD+= -L${.CURDIR}/../mmalloc/ -lmmalloc
DPADD+= ${.CURDIR}/../mmalloc/libmmalloc.a
diff --git a/gnu/usr.bin/groff/Makefile.cfg b/gnu/usr.bin/groff/Makefile.cfg
index 3a10f780e77e..3e8fc4f08505 100644
--- a/gnu/usr.bin/groff/Makefile.cfg
+++ b/gnu/usr.bin/groff/Makefile.cfg
@@ -1,4 +1,4 @@
-# $Id: Makefile.cfg,v 1.8 1996/05/07 23:15:36 wosch Exp $
+# $Id: Makefile.cfg,v 1.9 1996/05/22 00:26:57 wosch Exp $
BINDIR?= /usr/bin
SHELL= /bin/sh
@@ -58,10 +58,10 @@ indexname=Ind
# Libraries
# Bad assumption, if one exists they all exist
-.if exists(${.CURDIR}/../libgroff/obj)
-LIBGROFF= $(.CURDIR)/../libgroff/obj/libgroff.a
-LIBDRIVER= $(.CURDIR)/../libdriver/obj/libdriver.a
-LIBBIB= $(.CURDIR)/../libbib/obj/libbib.a
+.if exists(${.OBJDIR}/../libgroff)
+LIBGROFF= $(.OBJDIR)/../libgroff/libgroff.a
+LIBDRIVER= $(.OBJDIR)/../libdriver/libdriver.a
+LIBBIB= $(.OBJDIR)/../libbib/libbib.a
.else
LIBGROFF= $(.CURDIR)/../libgroff/libgroff.a
LIBDRIVER= $(.CURDIR)/../libdriver/libdriver.a
@@ -127,6 +127,4 @@ CFLAGS+=$(DEFINES)
-e "s;@G@;`echo $(g) | tr [a-z] [A-Z]`;g" \
$< >$@
-.if exists(${.CURDIR}/obj)
-MANSRC=${.CURDIR}/obj
-.endif
+MANSRC=${.OBJDIR}
diff --git a/gnu/usr.bin/man/lib/Makefile b/gnu/usr.bin/man/lib/Makefile
index cb5fd6394d6b..aa45037ab06c 100644
--- a/gnu/usr.bin/man/lib/Makefile
+++ b/gnu/usr.bin/man/lib/Makefile
@@ -1,7 +1,7 @@
LIB = man
-.if exists(${.CURDIR}/obj)
-CONFH= ${.CURDIR}/obj/config.h
+.if exists(${.OBJDIR})
+CONFH= ${.OBJDIR}/config.h
.else
CONFH= ${.CURDIR}/config.h
.endif
diff --git a/gnu/usr.bin/man/man/Makefile b/gnu/usr.bin/man/man/Makefile
index 1807455e219d..2fc044acb7ea 100644
--- a/gnu/usr.bin/man/man/Makefile
+++ b/gnu/usr.bin/man/man/Makefile
@@ -1,15 +1,15 @@
PROG= man
SRCS= man.c manpath.c glob.c
-.if exists(${.CURDIR}/../lib/obj)
-LDADD= -L${.CURDIR}/../lib/obj -lman
-CFLAGS+= -I${.CURDIR}/../lib/obj
+.if exists(${.OBJDIR}/../lib)
+LDADD= -L${.OBJDIR}/../lib -lman
+CFLAGS+= -I${.OBJDIR}/../lib
.else
LDADD= -L${.CURDIR}/../lib/ -lman
.endif
-.if exists(${.CURDIR}/obj)
-MAN1= ${.CURDIR}/obj/man.1
+.if exists(${.OBJDIR})
+MAN1= ${.OBJDIR}/man.1
.else
MAN1= ${.CURDIR}/man.1
.endif
diff --git a/gnu/usr.bin/man/manpath/Makefile b/gnu/usr.bin/man/manpath/Makefile
index 6633d6c1bd04..8e55b99a4364 100644
--- a/gnu/usr.bin/man/manpath/Makefile
+++ b/gnu/usr.bin/man/manpath/Makefile
@@ -1,21 +1,21 @@
PROG= manpath
SRCS= manpath.c
-.if exists(${.CURDIR}/../lib/obj)
-LDADD= -L${.CURDIR}/../lib/obj -lman
+.if exists(${.OBJDIR}/../lib)
+LDADD= -L${.OBJDIR}/../lib -lman
.else
LDADD= -L${.CURDIR}/../lib/ -lman
.endif
-.if exists(${.CURDIR}/obj)
-MAN1=${.CURDIR}/obj/manpath.1
+.if exists(${.OBJDIR})
+MAN1=${.OBJDIR}/manpath.1
.else
MAN1=${.CURDIR}/manpath.1
.endif
DPADD+= ${MAN1}
CFLAGS+= -DMAIN -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS
-CFLAGS+= -DALT_SYSTEMS -I${.CURDIR}/../lib -I${.CURDIR}/../lib/obj
+CFLAGS+= -DALT_SYSTEMS -I${.CURDIR}/../lib -I${.OBJDIR}/../lib
CLEANFILES+= ${MAN1}
MANDEPEND+= ${MAN1}
diff --git a/gnu/usr.bin/perl/usub/Makefile b/gnu/usr.bin/perl/usub/Makefile
index 826a976eb1a0..b66d6997dae6 100644
--- a/gnu/usr.bin/perl/usub/Makefile
+++ b/gnu/usr.bin/perl/usub/Makefile
@@ -16,8 +16,8 @@ VPATH+= ${.CURDIR}/../perl
NOMAN= yes
# If perl exists in none of these places, something is horribly wrong.
-.if exists(${.CURDIR}/../perl/obj/perl)
-PERL=${.CURDIR}/../perl/obj/perl
+.if exists(${.OBJDIR}/../perl/perl)
+PERL=${.OBJDIR}/../perl/perl
.endif
.if !defined(PERL) && exists(${.CURDIR}/../perl/perl)
PERL=${.CURDIR}/../perl/perl
diff --git a/gnu/usr.bin/rcs/Makefile.inc b/gnu/usr.bin/rcs/Makefile.inc
index cd593eda1c7c..22d60d72462d 100644
--- a/gnu/usr.bin/rcs/Makefile.inc
+++ b/gnu/usr.bin/rcs/Makefile.inc
@@ -1,7 +1,7 @@
# Location of librcs
-.if exists(${.CURDIR}/../lib/obj)
-LIBRCS= ${.CURDIR}/../lib/obj/librcs.a
+.if exists(${.OBJDIR}/../lib)
+LIBRCS= ${.OBJDIR}/../lib/librcs.a
.else
LIBRCS= ${.CURDIR}/../lib/librcs.a
.endif
diff --git a/gnu/usr.bin/send-pr/Makefile b/gnu/usr.bin/send-pr/Makefile
index a6e4d222f975..52fa57d0f274 100644
--- a/gnu/usr.bin/send-pr/Makefile
+++ b/gnu/usr.bin/send-pr/Makefile
@@ -13,7 +13,7 @@ SUBDIR+= doc
LINKS= ${BINDIR}/send-pr ${BINDIR}/sendbug
MLINKS= send-pr.1 sendbug.1
-all: send-pr _PROGSUBDIR
+all: send-pr _SUBDIR
send-pr: send-pr.sh Makefile
sed -e 's,@DATADIR@,/etc,g' \
diff --git a/gnu/usr.bin/texinfo/doc/Makefile b/gnu/usr.bin/texinfo/doc/Makefile
index fed0a54aa806..65c89da07eec 100644
--- a/gnu/usr.bin/texinfo/doc/Makefile
+++ b/gnu/usr.bin/texinfo/doc/Makefile
@@ -1,6 +1,6 @@
INFO= info info-stnd makeinfo texi
-.if exists(../makeinfo/obj)
-MAKEINFO= ${.CURDIR}/../makeinfo/obj/makeinfo
+.if exists(${.OBJDIR}/../makeinfo)
+MAKEINFO= ${.OBJDIR}/../makeinfo/makeinfo
.else
MAKEINFO= ${.CURDIR}/../makeinfo/makeinfo
.endif
diff --git a/lib/Makefile b/lib/Makefile
index d5118943ca9d..b102f23be517 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -14,7 +14,7 @@ SUBDIR+= libc libcompat libcom_err libcurses libedit \
libf2c libfakegnumalloc libftpio \
libkvm libmd libmytinfo libncurses libpcap libresolv librpcsvc \
libscsi libskey libss libtermcap libutil libxpg4 liby libipx \
- libdisk tcl
+ libdisk
.if !exists(../secure) || defined(NOSECURE) || defined(NOCRYPT)
SUBDIR+= libcrypt
diff --git a/lib/libss/Makefile b/lib/libss/Makefile
index 88adaaa941e7..cebc01b41aac 100644
--- a/lib/libss/Makefile
+++ b/lib/libss/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.10 1995/08/06 12:41:07 bde Exp $
+# $Id: Makefile,v 1.11 1996/05/07 23:19:15 wosch Exp $
LIB= ss
SRCS= ss_err.c data.c error.c execute_cmd.c help.c invocation.c list_rqs.c \
@@ -6,8 +6,8 @@ SRCS= ss_err.c data.c error.c execute_cmd.c help.c invocation.c list_rqs.c \
std_rqs.c
CFLAGS+= -I. -I${.CURDIR} -DPOSIX -DIN_LIBSS
CLEANFILES+= ss ss_err.c ss_err.h std_rqs.c
-.if exists(${.CURDIR}/../libcom_err/obj/.)
-LDADD+= -L${.CURDIR}/../libcom_err/obj
+.if exists(${.OBJDIR}/../libcom_err)
+LDADD+= -L${.OBJDIR}/../libcom_err
.else
LDADD+= -L${.CURDIR}/../libcom_err
.endif
diff --git a/release/floppies/boot/floppy/Makefile b/release/floppies/boot/floppy/Makefile
index ffbc3e091466..b6986ab80a25 100644
--- a/release/floppies/boot/floppy/Makefile
+++ b/release/floppies/boot/floppy/Makefile
@@ -1,11 +1,12 @@
-# $Id: Makefile,v 1.214 1996/05/02 08:18:28 jkh Exp $
+# $Id: Makefile,v 1.1 1996/05/21 01:12:35 julian Exp $
# If this is a RELEASE, then set
# Things which without too much trouble can be considered variables
# mountpoint for filesystems.
TOP=${.CURDIR}/../../../..
+OBJTOP=${.OBJDIR}/../../../..
FS_BIN=${.CURDIR}/../..
MNT= /mnt
@@ -56,18 +57,18 @@ all: ${FS_BIN}/write_mfs_in_kernel
#
doKERNEL:
cd ${TOP}/sys/i386/conf && config -n ${KERNEL}
- cd ${TOP}/sys/compile/${KERNEL} && \
+ cd ${OBJTOP}/sys/compile/${KERNEL} && \
make depend && \
make kernel && \
#
# --==## Put a filesystem into a BOOTMFS kernel ##==--
#
-LABELDIR=${TOP}/sys/i386/boot/biosboot/obj
+LABELDIR=${OBJTOP}/sys/i386/boot/biosboot
CONF=${TOP}/sys/i386/conf
-COMPILE=${TOP}/sys/compile
+COMPILE=${OBJTOP}/sys/compile
doMFSKERN:
- rm -f ${TOP}/sys/compile/BOOTMFS/mfs_vfsops.o
+ rm -f ${OBJTOP}/sys/compile/BOOTMFS/mfs_vfsops.o
cd ${CONF} && \
fgrep -v SYSV GENERIC | \
fgrep -v pty | \
diff --git a/secure/lib/libcrypt/test/Makefile b/secure/lib/libcrypt/test/Makefile
index b65b09fa5093..c55a276a571d 100644
--- a/secure/lib/libcrypt/test/Makefile
+++ b/secure/lib/libcrypt/test/Makefile
@@ -2,15 +2,9 @@
# Hacked Makefile to compile and run the DES-certification program,
# but not install anything.
#
-# $Id: Makefile,v 1.3 1994/08/12 21:55:04 csgr Exp $
+# $Id: Makefile,v 1.4 1995/05/30 06:11:48 rgrimes Exp $
#
-.if exists (../obj)
-OBJDIR = obj
-.else
-OBJDIR =
-.endif
-
-LIBCRYPT= $(.CURDIR)/../$(OBJDIR)/libdescrypt.a
+LIBCRYPT= $(.OBJDIR)/libdescrypt.a
#CFLAGS+= -DHAVE_CRYPT16
diff --git a/secure/usr.bin/bdes/Makefile b/secure/usr.bin/bdes/Makefile
index 8f5234a4a815..5af8438a1d4b 100644
--- a/secure/usr.bin/bdes/Makefile
+++ b/secure/usr.bin/bdes/Makefile
@@ -1,11 +1,11 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $Id: Makefile,v 1.5 1994/11/14 20:45:35 phk Exp $
+# $Id: Makefile,v 1.6 1995/12/21 17:57:16 ache Exp $
PROG= bdes
SRCS= bdes.c
-.if exists(${.CURDIR}/../../lib/libcipher/obj)
-LDFLAGS+= -L${.CURDIR}/../../lib/libcipher/obj
+.if exists(${.OBJDIR}/../../lib/libcipher)
+LDFLAGS+= -L${.OBJDIR}/../../lib/libcipher
.else
LDFLAGS+= -L${.CURDIR}/../../lib/libcipher
.endif
diff --git a/share/colldef/Makefile b/share/colldef/Makefile
index 00b7b4707992..6e653c643783 100644
--- a/share/colldef/Makefile
+++ b/share/colldef/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.5 1995/10/22 00:58:41 ache Exp $
+# $Id: Makefile,v 1.1 1995/11/03 14:53:50 ache Exp $
NOMAN=YES
CLEANFILES+= ${LOCALES:S/$/.out/g}
@@ -6,8 +6,8 @@ CLEANFILES+= ${LOCALES:S/$/.out/g}
LOCALES= ru_SU.KOI8-R ru_SU.CP866 lt_LN.ISO_8859-1
LOCALEDIR= ${DESTDIR}/usr/share/locale
-.if exists(${.CURDIR}/../obj)
-COLLDEF=${.CURDIR}/../obj/colldef
+.if exists(${.OBJDIR}/../colldef)
+COLLDEF=${.OBJDIR}/../colldef
.else
COLLDEF=${.CURDIR}/../colldef
.endif
diff --git a/share/doc/psd/19.curses/Makefile b/share/doc/psd/19.curses/Makefile
index ce71b294f189..332cf3bd3045 100644
--- a/share/doc/psd/19.curses/Makefile
+++ b/share/doc/psd/19.curses/Makefile
@@ -1,5 +1,5 @@
# From: @(#)Makefile 8.1 (Berkeley) 8/14/93
-# $Id: Makefile,v 1.1 1995/01/11 01:52:02 wollman Exp $
+# $Id: Makefile,v 1.2 1995/02/08 21:27:09 bde Exp $
VOLUME= psd/19.curses
SRCS= Master
@@ -30,7 +30,7 @@ VFONT= /usr/libexec/vfontedpr
.MAIN: all
Master: ${SRCLINKS}
- for a in Master ${.ALLSRC}; do \
+ @for a in Master ${.ALLSRC}; do \
test -e $$a || ln -s ${LSRCDIR}/$$a .; \
done
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 5fb1934b5434..81763a347e63 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -16,7 +16,7 @@ MLINKS+=ipfirewall.4 ipacct.4 ipfirewall.4 ipfw.4 ipfirewall.4 ipaccounting.4
MLINKS+=fpa.4 fea.4
# XXX NOT IMPORTED: man4.hp300 man4.sparc man4.tahoe man4.vax
SUBDIR= man4.i386
-MANDEPEND=_PROGSUBDIR
+MANDEPEND=_SUBDIR
install: maninstall
diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile
index 6dad3c915968..65a1e1b7f91e 100644
--- a/share/man/man8/Makefile
+++ b/share/man/man8/Makefile
@@ -3,7 +3,7 @@
MAN8= adding_user.8 intro.8 rc.8 sticky.8
# XXX NOT IMPORTED: man8.hp300 man8.tahoe man8.vax
SUBDIR= man8.i386
-MANDEPEND=_PROGSUBDIR
+MANDEPEND=_SUBDIR
install: maninstall
diff --git a/share/mk/Makefile b/share/mk/Makefile
index ae856da7b137..fc9bd75bd987 100644
--- a/share/mk/Makefile
+++ b/share/mk/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.9 1995/09/08 19:27:48 jfieber Exp $
+# $Id: Makefile,v 1.10 1996/04/12 11:13:29 wosch Exp $
# From: @(#)Makefile 8.1 (Berkeley) 6/8/93
FILES= bsd.README
@@ -11,7 +11,7 @@ NOOBJ= noobj
all clean cleandir depend lint tags:
afterinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
+ cd ${.CURDIR} && ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
${DESTDIR}${BINDIR}/mk
.include <bsd.prog.mk>
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 5bf3c3b0cae0..4330e2d399cc 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -1,4 +1,4 @@
-# $Id: bsd.dep.mk,v 1.3 1996/04/01 18:58:28 wosch Exp $
+# $Id: bsd.dep.mk,v 1.4 1996/05/25 23:09:46 wosch Exp $
#
# The include file <bsd.dep.mk> handles Makefile dependencies.
#
@@ -33,7 +33,7 @@ DEPENDFILE?= .depend
# some of the rules involve .h sources, so remove them from mkdep line
.if !target(depend)
-depend: beforedepend ${DEPENDFILE} afterdepend ${_DEPSUBDIR}
+depend: beforedepend ${DEPENDFILE} afterdepend _SUBDIR
.if defined(SRCS)
# .if defined ${SRCS:M*.[sS]} does not work
@@ -58,7 +58,7 @@ ${DEPENDFILE}: ${SRCS}
.endif
.else
-${DEPENDFILE}: ${_DEPSUBDIR}
+${DEPENDFILE}: _SUBDIR
.endif
.if !target(beforedepend)
beforedepend:
@@ -70,17 +70,33 @@ afterdepend:
.if !target(tags)
.if defined(SRCS)
-tags: ${SRCS}
+tags: ${SRCS} _SUBDIR
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
sed "s;\${.CURDIR}/;;" > tags
.else
-tags:
+tags: _SUBDIR
.endif
.endif
.if defined(SRCS)
-clean:
-cleandir: cleandepend
-cleandepend:
- rm -f ${DEPENDFILE} ${.CURDIR}/tags
+.if !target(clean)
+clean: _SUBDIR
+.endif
+.if !target(cleandepend)
+cleandepend: _SUBDIR
+ rm -f ${DEPENDFILE} tags
+.endif
+.endif
+
+_SUBDIR: .USE
+.if defined(SUBDIR) && !empty(SUBDIR)
+ @for entry in ${SUBDIR}; do \
+ (${ECHODIR} "===> ${DIRPRFX}$$entry"; \
+ if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
+ cd ${.CURDIR}/$${entry}.${MACHINE}; \
+ else \
+ cd ${.CURDIR}/$${entry}; \
+ fi; \
+ ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \
+ done
.endif
diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk
index 2d460f557ddc..833b821cdea7 100644
--- a/share/mk/bsd.doc.mk
+++ b/share/mk/bsd.doc.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91
-# $Id: bsd.doc.mk,v 1.23 1995/11/29 16:05:08 bde Exp $
+# $Id: bsd.doc.mk,v 1.24 1996/03/09 23:48:53 wosch Exp $
PRINTER?= ascii
@@ -70,29 +70,10 @@ print: ${DFILE}
.endif
.endif
-.if !target(obj)
-.if defined(NOOBJ)
-obj:
-.else
-obj:
- @cd ${.CURDIR}; rm -f obj; \
- here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
- ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \
- if test -d /usr/obj -a ! -d $$dest; then \
- mkdir -p $$dest; \
- else \
- true; \
- fi;
-.endif
-.endif
-
clean:
rm -f ${DOC}.${PRINTER} ${DOC}.ps ${DOC}.ascii \
${DOC}.ps.gz ${DOC}.ascii.gz Errs errs mklog ${CLEANFILES}
-cleandir: clean
- cd ${.CURDIR}; rm -rf obj
-
FILES?= ${SRCS}
realinstall:
@if [ ! -d "${DESTDIR}${BINDIR}/${VOLUME}" ]; then \
@@ -151,10 +132,11 @@ ${DFILE}: ${DOC}.${PRINTER}
.if !target(depend)
depend:
-
.endif
.if !target(maninstall)
maninstall:
-
.endif
+
+.include <bsd.dep.mk>
+.include <bsd.obj.mk>
diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk
index 9b4f0a3c7782..a6b032461f8e 100644
--- a/share/mk/bsd.info.mk
+++ b/share/mk/bsd.info.mk
@@ -1,4 +1,4 @@
-# $Id: bsd.info.mk,v 1.16 1996/02/08 18:27:07 mpp Exp $
+# $Id: bsd.info.mk,v 1.17 1996/03/07 23:39:45 wosch Exp $
BINMODE= 444
BINDIR?= /usr/share/info
@@ -17,10 +17,10 @@ MAKEINFOFLAGS+= --no-split # simplify some things, e.g., compression
.if !defined(NOINFOCOMPRESS)
IFILES= ${INFO:S/$/.info.gz/g}
-all: ${IFILES}
+all: ${IFILES} _SUBDIR
.else
IFILES= ${INFO:S/$/.info/g}
-all: ${IFILES}
+all: ${IFILES} _SUBDIR
.endif
GZIPCMD?= gzip
@@ -37,7 +37,7 @@ DISTRIBUTION= info
.endif
.if !target(distribute)
-distribute:
+distribute: _SUBDIR
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
.endif
@@ -46,32 +46,13 @@ ${INFO}.info: ${SRCS}
${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} ${SRCS:S/^/${.CURDIR}\//g} -o ${INFO}.info
.endif
-depend:
+depend: _SUBDIR
@echo -n
-.if !target(obj)
-.if defined(NOOBJ)
-obj:
-.else
-obj:
- @cd ${.CURDIR}; rm -f obj; \
- here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
- ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \
- if test -d /usr/obj -a ! -d $$dest; then \
- mkdir -p $$dest; \
- else \
- true; \
- fi;
-.endif
-.endif
-
-clean:
+clean: _SUBDIR
rm -f ${INFO:S/$/.info*/g} Errs errs mklog ${CLEANFILES}
-cleandir: clean
- cd ${.CURDIR}; rm -rf obj
-
-install:
+install: _SUBDIR
@if [ ! -d "${DESTDIR}${BINDIR}" ]; then \
/bin/rm -f ${DESTDIR}${BINDIR} ; \
mkdir -p ${DESTDIR}${BINDIR} ; \
@@ -84,6 +65,8 @@ install:
${IFILES} ${DESTDIR}${BINDIR}
.if !target(maninstall)
-maninstall:
-
+maninstall: _SUBDIR
.endif
+
+.include <bsd.dep.mk>
+.include <bsd.obj.mk>
diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk
index dde7ea09ecd8..258b8858b2e5 100644
--- a/share/mk/bsd.kmod.mk
+++ b/share/mk/bsd.kmod.mk
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $Id: bsd.kmod.mk,v 1.21 1996/05/25 23:09:47 wosch Exp $
+# $Id: bsd.kmod.mk,v 1.22 1996/06/17 15:11:10 bde Exp $
#
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
# <bsd.kmod.mk> includes the file named "../Makefile.inc" if it exists,
@@ -134,25 +134,12 @@ MAN1= ${KMOD}.4
.endif
.elif !target(maninstall)
-maninstall:
+maninstall: _SUBDIR
all-man:
.endif
-_PROGSUBDIR: .USE
-.if defined(SUBDIR) && !empty(SUBDIR)
- @for entry in ${SUBDIR}; do \
- (${ECHODIR} "===> $$entry"; \
- if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
- cd ${.CURDIR}/$${entry}.${MACHINE}; \
- else \
- cd ${.CURDIR}/$${entry}; \
- fi; \
- ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/}); \
- done
-.endif
-
.MAIN: all
-all: ${PROG} all-man _PROGSUBDIR
+all: ${PROG} all-man _SUBDIR
CLEANFILES+=${PROG} ${OBJS}
@@ -164,7 +151,7 @@ beforeinstall:
afterinstall:
.endif
-realinstall: _PROGSUBDIR
+realinstall: _SUBDIR
${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
.if defined(LINKS) && !empty(LINKS)
@@ -180,7 +167,7 @@ realinstall: _PROGSUBDIR
done; true
.endif
-install: afterinstall
+install: afterinstall _SUBDIR
.if !defined(NOMAN)
afterinstall: realinstall maninstall
.else
@@ -191,12 +178,12 @@ realinstall: beforeinstall
DISTRIBUTION?= bin
.if !target(distribute)
-distribute:
+distribute: _SUBDIR
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
.endif
.if !target(tags)
-tags: ${SRCS} _PROGSUBDIR
+tags: ${SRCS} _SUBDIR
.if defined(PROG)
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
sed "s;\${.CURDIR}/;;" > tags
@@ -221,8 +208,5 @@ vnode_if.h: ${KERN}/vnode_if.sh ${KERN}/vnode_if.src
./vnode_if.h: vnode_if.h
-_DEPSUBDIR= _PROGSUBDIR
-_SUBDIRUSE: _PROGSUBDIR
-.include <bsd.obj.mk>
.include <bsd.dep.mk>
-
+.include <bsd.obj.mk>
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 7fd8d070faf5..1df5d8c89eca 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
-# $Id: bsd.lib.mk,v 1.34 1996/06/03 13:23:31 jfieber Exp $
+# $Id: bsd.lib.mk,v 1.35 1996/06/17 15:59:51 phk Exp $
#
.if exists(${.CURDIR}/../Makefile.inc)
@@ -124,20 +124,7 @@ _LIBS+=lib${LIB}_pic.a
PICFLAG=-fpic
.endif
-_LIBSUBDIR: .USE
-.if defined(SUBDIR) && !empty(SUBDIR)
- @for entry in ${SUBDIR}; do \
- (${ECHODIR} "===> ${DIRPRFX}$$entry"; \
- if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
- cd ${.CURDIR}/$${entry}.${MACHINE}; \
- else \
- cd ${.CURDIR}/$${entry}; \
- fi; \
- ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \
- done
-.endif
-
-all: ${_LIBS} all-man _LIBSUBDIR # llib-l${LIB}.ln
+all: ${_LIBS} all-man _SUBDIR # llib-l${LIB}.ln
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
@@ -184,29 +171,15 @@ llib-l${LIB}.ln: ${SRCS}
${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c}
.if !target(clean)
-clean: _LIBSUBDIR
- rm -f a.out Errs errs mklog ${CLEANFILES} ${OBJS}
- rm -f lib${LIB}.a llib-l${LIB}.ln
- rm -f ${POBJS} profiled/*.o lib${LIB}_p.a
- rm -f ${SOBJS} shared/*.o
- rm -f lib${LIB}.so.*.* lib${LIB}_pic.a
-.if defined(CLEANDIRS)
- rm -rf ${CLEANDIRS}
-.endif
-.endif
-
-.if !target(cleandir)
-cleandir: _LIBSUBDIR
+clean: _SUBDIR
rm -f a.out Errs errs mklog ${CLEANFILES} ${OBJS}
rm -f lib${LIB}.a llib-l${LIB}.ln
- rm -f ${.CURDIR}/tags .depend
rm -f ${POBJS} profiled/*.o lib${LIB}_p.a
rm -f ${SOBJS} shared/*.o
rm -f lib${LIB}.so.*.* lib${LIB}_pic.a
.if defined(CLEANDIRS)
rm -rf ${CLEANDIRS}
.endif
- cd ${.CURDIR}; rm -rf obj;
.endif
.if defined(SRCS)
@@ -259,7 +232,7 @@ realinstall: beforeinstall
done; true
.endif
-install: afterinstall _LIBSUBDIR
+install: afterinstall _SUBDIR
.if !defined(NOMAN)
afterinstall: realinstall maninstall
.else
@@ -269,7 +242,7 @@ afterinstall: realinstall
DISTRIBUTION?= bin
.if !target(distribute)
-distribute: _LIBSUBDIR
+distribute: _SUBDIR
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
.endif
@@ -278,7 +251,7 @@ lint:
.endif
.if !target(tags)
-tags: ${SRCS}
+tags: ${SRCS} _SUBDIR
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:M*.c} | \
sed "s;\${.CURDIR}/;;" > tags
.endif
@@ -290,21 +263,5 @@ maninstall:
all-man:
.endif
-.if !target(obj)
-.if defined(NOOBJ)
-obj: _LIBSUBDIR
-.else
-obj: _LIBSUBDIR
- @cd ${.CURDIR}; rm -rf obj; \
- here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
- ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \
- if test -d /usr/obj -a ! -d $$dest; then \
- mkdir -p $$dest; \
- else \
- true; \
- fi;
-.endif
-.endif
-
-_DEPSUBDIR= _LIBSUBDIR
.include <bsd.dep.mk>
+.include <bsd.obj.mk>
diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk
index 200434cb5851..1612344d4d4a 100644
--- a/share/mk/bsd.obj.mk
+++ b/share/mk/bsd.obj.mk
@@ -1,4 +1,4 @@
-# $Id: bsd.obj.mk,v 1.3 1996/04/22 23:31:39 wosch Exp $
+# $Id: bsd.obj.mk,v 1.4 1996/05/27 23:05:54 wosch Exp $
#
# The include file <bsd.obj.mk> handles creating 'obj' directory
# and cleaning up object files, log files etc.
@@ -6,26 +6,19 @@
#
# +++ variables +++
#
-# BSDSRCDIR The real path to the system sources, so that 'make obj'
-# will work correctly. [/usr/src]
-#
-# BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj'
-# will work correctly. [/usr/obj]
-#
# CLEANFILES Additional files to remove for the clean and cleandir targets.
#
-# MAKEOBJDIR A file name to the directory where the targets
-# are built. Note: MAKEOBJDIR is an *enviroment* variable
+# MAKEOBJDIR Specify somewhere other than /usr/obj to root the object
+# tree. Note: MAKEOBJDIR is an *enviroment* variable
# and does work proper only if set as enviroment variable,
# not as global or command line variable! [obj]
#
-# E.g. use `env MAKEOBJDIR=obj-amd make'
-#
-# NOOBJ Do not create 'obj' directory if defined. [not set]
+# E.g. use `env MAKEOBJDIR=/somewhere/obj make'
#
-# NOOBJLINK Create 'obj' directory in current directory instead
-# a symbolic link to the 'obj' tree if defined. [not set]
+# NOOBJ Do not create build directory in object tree.
#
+# OBJLINK Create a symbolic link from ${.TARGETOBJDIR} to ${.CURDIR}/obj
+# Note: This BREAKS the read-only src tree rule!
#
# +++ targets +++
#
@@ -33,67 +26,77 @@
# remove a.out Errs errs mklog ${CLEANFILES}
#
# cleandir:
-# remove all of the files removed by the target clean,
-# cleandepend (see bsd.dep.mk) and 'obj' directory.
+# remove the build directory (and all its contents) created by obj
#
# obj:
-# create 'obj' directory.
+# create build directory.
#
-.if defined(MAKEOBJDIR) && !empty(MAKEOBJDIR)
-__objdir = ${MAKEOBJDIR}
-.else
-
-.if defined(MACHINE) && !empty(MACHINE)
-__objdir = obj # obj.${MACHINE}
-.else
-__objdir = obj
-.endif
-.endif
-
-
.if !target(obj)
.if defined(NOOBJ)
obj:
.else
-
-obj: _SUBDIRUSE cleanobj
-.if defined(NOOBJLINK)
- mkdir ${.CURDIR}/${__objdir}
+.if !defined(OBJLINK)
+obj: _SUBDIR
+ @if ! test -d ${.TARGETOBJDIR}; then \
+ mkdir -p ${.TARGETOBJDIR}; \
+ if ! test -d ${.TARGETOBJDIR}; then \
+ ${ECHO} "Unable to create ${.TARGETOBJDIR}."; \
+ exit 1; \
+ fi; \
+ ${ECHO} "${.TARGETOBJDIR} created for ${.CURDIR}"; \
+ fi
.else
- @if test -d ${BSDOBJDIR}; then \
- cd ${.CURDIR}; here=${.CURDIR}; \
- dest=${BSDOBJDIR}`echo $$here | \
- sed "s,^${BSDSRCDIR},,"`/${__objdir}; \
- ${ECHO} "$$here/${__objdir} -> $$dest"; \
- ln -s $$dest ${__objdir}; \
- if test ! -d $$dest; then \
- mkdir -p $$dest; \
- fi; \
- else \
- ${ECHO} "obj tree \"${BSDOBJDIR}\" does not exist."; \
+obj: _SUBDIR
+ @if ! test -d ${.TARGETOBJDIR}; then \
+ mkdir -p ${.TARGETOBJDIR}; \
+ if ! test -d ${.TARGETOBJDIR}; then \
+ ${ECHO} "Unable to create ${.TARGETOBJDIR}."; \
+ exit 1; \
+ fi; \
+ ln -fs ${.TARGETOBJDIR} ${.CURDIR}/obj; \
+ ${ECHO} "${.CURDIR} -> ${.TARGETOBJDIR}"; \
fi
.endif
.endif
.endif
+.if !target(objlink)
+objlink: _SUBDIR
+ @if test -d ${.TARGETOBJDIR}; then \
+ ln -fs ${.TARGETOBJDIR} ${.CURDIR}/obj; \
+ else \
+ echo "No ${.TARGETOBJDIR} to link to - do a make obj."; \
+ fi
+.endif
+
#
# cleanup
#
-cleanobj:
- rm -f -r ${.CURDIR}/${__objdir}
+cleanobj:
+ @if [ -d ${.TARGETOBJDIR} ]; then \
+ rm -rf ${.TARGETOBJDIR}; \
+ else \
+ cd ${.CURDIR} && ${MAKE} clean cleandepend; \
+ fi
+.if defined(OBJLINK)
+ @if [ -h ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
+.endif
+.if !target(cleanfiles)
cleanfiles:
rm -f a.out Errs errs mklog ${CLEANFILES}
+.endif
# see bsd.dep.mk
.if !target(cleandepend)
cleandepend:
+ @rm -f .depend
.endif
.if !target(clean)
-clean: _SUBDIRUSE cleanfiles
+clean: cleanfiles _SUBDIR
.endif
-cleandir: _SUBDIRUSE cleanfiles cleandepend cleanobj
+cleandir: cleanobj _SUBDIR
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk
index a33b87614a00..de022f5fdd41 100644
--- a/share/mk/bsd.own.mk
+++ b/share/mk/bsd.own.mk
@@ -1,4 +1,4 @@
-# $Id: bsd.own.mk,v 1.5 1996/03/31 23:15:17 wosch Exp $
+# $Id: bsd.own.mk,v 1.6 1996/05/25 23:09:49 wosch Exp $
#
# The include file <bsd.own.mk> set common variables for owner,
# group, mode, and directories. Defaults are in brackets.
@@ -6,16 +6,6 @@
#
# +++ variables +++
#
-# where the system object and source trees are kept; can be configurable
-# by the user in case they want them in ~/foosrc and ~/fooobj, for example
-# where the system object and source trees are kept; can be configurable
-# by the user in case they want them in ~/foosrc and ~/fooobj, for example
-# BSDOBJDIR The real path to the system 'obj' tree, so that 'make obj'
-# will work correctly. [/usr/obj]
-#
-# BSDSRCDIR The real path to the system sources, so that 'make obj'
-# will work correctly. [/usr/src]
-#
# DESTDIR Change the tree where the file gets installed. [not set]
#
# DISTDIR Change the tree where the file for a distribution
@@ -117,10 +107,6 @@
#
-BSDSRCDIR?= /usr/src
-BSDOBJDIR?= /usr/obj
-
-
# Binaries
BINOWN?= bin
BINGRP?= bin
diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk
index dd18305fe44a..c5d228114af2 100644
--- a/share/mk/bsd.port.mk
+++ b/share/mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.212 1996/06/20 23:52:45 jkh Exp $
+# $Id: bsd.port.mk,v 1.213 1996/06/22 21:20:56 gpalmer Exp $
#
# Please view me with 4 column tabs!
@@ -210,8 +210,8 @@
# Support for an encapsulation in /usr/src - these are essentially simplied ports
# and have a number of defaults we can presume right off the bat.
.if defined(SRC_ENCAPSULATION)
-.if exists (${.CURDIR}/obj)
-WRKDIR=${.CURDIR}/obj
+.if exists (${BSDOBJDIR}/${.CURDIR})
+WRKDIR=${BSDOBJDIR}/${.CURDIR}
.else
NO_WRKDIR= yes
.endif
@@ -226,28 +226,7 @@ describe:
# Finally, give us working obj and cleandir targets to make us more compatible
# with "traditional" /usr/src ports.
-.if !target(obj)
-.if defined(NOOBJ)
-obj:
- @${DO_NADA}
-.else
-obj:
- @cd ${.CURDIR}; rm -rf obj; here=`pwd`; \
- dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; ${ECHO} "$$here -> $$dest"; \
- ln -s $$dest obj; if test -d /usr/obj -a ! -d $$dest; then mkdir -p $$dest; fi
-.endif
-.endif
-
-.if !target(cleandir)
-.if defined(NOCLEANDIR)
-cleandir:
- @${DO_NADA}
-.else
-cleandir: clean
- @if [ "${WRKDIR}" != "${.CURDIR}" ]; then ${RM} -rf ${WRKDIR}/; fi
- @rm -f ${.CURDIR}/obj
-.endif
-.endif
+.include <bsd.obj.mk>
.if !target(distribute)
distribute:
@@ -1002,7 +981,7 @@ pre-clean:
.if !target(clean)
clean: pre-clean
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}"
-.if !defined(NO_WRKDIR) && !exists(${.CURDIR}/obj)
+.if !defined(NO_WRKDIR)
@${RM} -rf ${WRKDIR}
.else
@${RM} -f ${WRKDIR}/.*_done
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index c14c57c7f6d2..a8275a0017cf 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $Id: bsd.prog.mk,v 1.32 1996/06/17 15:59:52 phk Exp $
+# $Id: bsd.prog.mk,v 1.33 1996/06/22 06:01:57 phk Exp $
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
@@ -130,53 +130,27 @@ MAN1= ${PROG}.1
.endif
.endif
-_PROGSUBDIR: .USE
-.if defined(SUBDIR) && !empty(SUBDIR)
- @for entry in ${SUBDIR}; do \
- (${ECHODIR} "===> ${DIRPRFX}$$entry"; \
- if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
- cd ${.CURDIR}/$${entry}.${MACHINE}; \
- else \
- cd ${.CURDIR}/$${entry}; \
- fi; \
- ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \
- done
-.endif
-
# XXX I think MANDEPEND is only used for groff. It should be named more
# generally and perhaps not be in the maninstall dependencies now it is
# here (or does maninstall always work when nothing is made?),
.MAIN: all
-all: ${PROG} all-man _PROGSUBDIR
+all: ${PROG} all-man _SUBDIR
.if !target(clean)
-clean: _PROGSUBDIR
+clean: _SUBDIR
rm -f a.out Errs errs mklog ${PROG} ${OBJS} ${CLEANFILES}
.if defined(CLEANDIRS)
rm -rf ${CLEANDIRS}
.endif
.endif
-.if !target(cleandir)
-cleandir: _PROGSUBDIR
- rm -f a.out Errs errs mklog ${PROG} ${OBJS} ${CLEANFILES}
- rm -f ${.CURDIR}/tags .depend
-.if defined(CLEANDIRS)
- rm -rf ${CLEANDIRS}
-.endif
- cd ${.CURDIR}; rm -rf obj;
-.endif
-
.if !target(install)
.if !target(beforeinstall)
beforeinstall:
.endif
-.if !target(afterinstall)
-afterinstall:
-.endif
-realinstall: _PROGSUBDIR
+realinstall: beforeinstall
.if defined(PROG)
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
@@ -198,46 +172,29 @@ realinstall: _PROGSUBDIR
done; true
.endif
-install: afterinstall
+install: afterinstall _SUBDIR
.if !defined(NOMAN)
afterinstall: realinstall maninstall
.else
afterinstall: realinstall
.endif
-realinstall: beforeinstall
.endif
DISTRIBUTION?= bin
.if !target(distribute)
-distribute:
+distribute: _SUBDIR
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
.endif
.if !target(lint)
-lint: ${SRCS} _PROGSUBDIR
+lint: ${SRCS} _SUBDIR
.if defined(PROG)
@${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1
.endif
.endif
-.if !target(obj)
-.if defined(NOOBJ)
-obj: _PROGSUBDIR
-.else
-obj: _PROGSUBDIR
- @cd ${.CURDIR}; rm -rf obj; \
- here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
- ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \
- if test -d /usr/obj -a ! -d $$dest; then \
- mkdir -p $$dest; \
- else \
- true; \
- fi;
-.endif
-.endif
-
.if !target(tags)
-tags: ${SRCS} _PROGSUBDIR
+tags: ${SRCS} _SUBDIR
.if defined(PROG)
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
sed "s;\${.CURDIR}/;;" > tags
@@ -251,5 +208,5 @@ maninstall:
all-man:
.endif
-_DEPSUBDIR= _PROGSUBDIR
.include <bsd.dep.mk>
+.include <bsd.obj.mk>
diff --git a/share/mk/bsd.sgml.mk b/share/mk/bsd.sgml.mk
index db32879f9608..e8e845d2fd00 100644
--- a/share/mk/bsd.sgml.mk
+++ b/share/mk/bsd.sgml.mk
@@ -1,7 +1,7 @@
# bsd.sgml.mk - 8 Sep 1995 John Fieber
# This file is in the public domain.
#
-# $Id: bsd.sgml.mk,v 1.7 1996/04/29 15:59:01 wosch Exp $
+# $Id: bsd.sgml.mk,v 1.5 1996/05/27 23:12:15 wosch Exp $
#
# The include file <bsd.sgml.mk> handles installing sgml documents.
# <bsd.prog.mk> includes the file named "../Makefile.inc" if it exists,
@@ -81,7 +81,6 @@ realinstall: ${FORMATS:S/^/install-/g}
.if !target(print)
print: ${FORMATS:S/^/print-/g}
-
.endif
spell: ${SRCS}
@@ -146,10 +145,11 @@ CLEANFILES+= ${DOC}.${_FORMAT}
.endfor
-.for __target in beforeinstall afterinstall maninstall depend _SUBDIRUSE
+.for __target in beforeinstall afterinstall maninstall depend _SUBDIR
.if !target(__target)
${__target}:
.endif
.endfor
+.include <bsd.dep.mk>
.include <bsd.obj.mk>
diff --git a/share/mklocale/Makefile b/share/mklocale/Makefile
index fb6161fedf1b..809390e471a3 100644
--- a/share/mklocale/Makefile
+++ b/share/mklocale/Makefile
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: Makefile,v 1.2 1995/11/03 14:51:45 ache Exp $
NOMAN=YES
CLEANFILES+= ${LOCALES:S/$/.out/g}
@@ -6,8 +6,8 @@ CLEANFILES+= ${LOCALES:S/$/.out/g}
LOCALES= ja_JP.EUC ru_SU.KOI8-R lt_LN.ASCII lt_LN.ISO_8859-1 ru_SU.CP866
LOCALEDIR= ${DESTDIR}/usr/share/locale
-.if exists(${.CURDIR}/../obj)
-MKLOCALE=${.CURDIR}/../obj/mklocale
+.if exists(${.OBJDIR}/..)
+MKLOCALE=${.OBJDIR}/../mklocale
.else
MKLOCALE=${.CURDIR}/../mklocale
.endif
diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile
index 3816baa2f906..89c098b87e18 100644
--- a/share/zoneinfo/Makefile
+++ b/share/zoneinfo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.7 1994/09/13 22:02:46 wollman Exp $
+# $Id: Makefile,v 1.8 1995/11/16 02:00:38 gpalmer Exp $
NOBIN=
CLEANFILES+= yearistype
@@ -17,8 +17,8 @@ POSIXRULES= America/New_York
TZFILES+= backward
.endif
-.if exists(${.CURDIR}/obj/.)
-YEARISTYPE=${.CURDIR}/obj/yearistype
+.if exists(${.OBJDIR}/yearistype)
+YEARISTYPE=${.OBJDIR}/yearistype
.else
YEARISTYPE=${.CURDIR}/yearistype
.endif
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index dde7ea09ecd8..258b8858b2e5 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $Id: bsd.kmod.mk,v 1.21 1996/05/25 23:09:47 wosch Exp $
+# $Id: bsd.kmod.mk,v 1.22 1996/06/17 15:11:10 bde Exp $
#
# The include file <bsd.kmod.mk> handles installing Loadable Kernel Modules.
# <bsd.kmod.mk> includes the file named "../Makefile.inc" if it exists,
@@ -134,25 +134,12 @@ MAN1= ${KMOD}.4
.endif
.elif !target(maninstall)
-maninstall:
+maninstall: _SUBDIR
all-man:
.endif
-_PROGSUBDIR: .USE
-.if defined(SUBDIR) && !empty(SUBDIR)
- @for entry in ${SUBDIR}; do \
- (${ECHODIR} "===> $$entry"; \
- if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
- cd ${.CURDIR}/$${entry}.${MACHINE}; \
- else \
- cd ${.CURDIR}/$${entry}; \
- fi; \
- ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/}); \
- done
-.endif
-
.MAIN: all
-all: ${PROG} all-man _PROGSUBDIR
+all: ${PROG} all-man _SUBDIR
CLEANFILES+=${PROG} ${OBJS}
@@ -164,7 +151,7 @@ beforeinstall:
afterinstall:
.endif
-realinstall: _PROGSUBDIR
+realinstall: _SUBDIR
${INSTALL} ${COPY} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
.if defined(LINKS) && !empty(LINKS)
@@ -180,7 +167,7 @@ realinstall: _PROGSUBDIR
done; true
.endif
-install: afterinstall
+install: afterinstall _SUBDIR
.if !defined(NOMAN)
afterinstall: realinstall maninstall
.else
@@ -191,12 +178,12 @@ realinstall: beforeinstall
DISTRIBUTION?= bin
.if !target(distribute)
-distribute:
+distribute: _SUBDIR
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies
.endif
.if !target(tags)
-tags: ${SRCS} _PROGSUBDIR
+tags: ${SRCS} _SUBDIR
.if defined(PROG)
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
sed "s;\${.CURDIR}/;;" > tags
@@ -221,8 +208,5 @@ vnode_if.h: ${KERN}/vnode_if.sh ${KERN}/vnode_if.src
./vnode_if.h: vnode_if.h
-_DEPSUBDIR= _PROGSUBDIR
-_SUBDIRUSE: _PROGSUBDIR
-.include <bsd.obj.mk>
.include <bsd.dep.mk>
-
+.include <bsd.obj.mk>
diff --git a/usr.bin/colldef/data/Makefile b/usr.bin/colldef/data/Makefile
index 00b7b4707992..6e653c643783 100644
--- a/usr.bin/colldef/data/Makefile
+++ b/usr.bin/colldef/data/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.5 1995/10/22 00:58:41 ache Exp $
+# $Id: Makefile,v 1.1 1995/11/03 14:53:50 ache Exp $
NOMAN=YES
CLEANFILES+= ${LOCALES:S/$/.out/g}
@@ -6,8 +6,8 @@ CLEANFILES+= ${LOCALES:S/$/.out/g}
LOCALES= ru_SU.KOI8-R ru_SU.CP866 lt_LN.ISO_8859-1
LOCALEDIR= ${DESTDIR}/usr/share/locale
-.if exists(${.CURDIR}/../obj)
-COLLDEF=${.CURDIR}/../obj/colldef
+.if exists(${.OBJDIR}/../colldef)
+COLLDEF=${.OBJDIR}/../colldef
.else
COLLDEF=${.CURDIR}/../colldef
.endif
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 169800046717..4094276d236f 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -375,6 +375,7 @@ main(argc, argv)
char mdpath[MAXPATHLEN + 1];
char obpath[MAXPATHLEN + 1];
char cdpath[MAXPATHLEN + 1];
+ char *realobjdir; /* Where we'd like to go */
struct utsname utsname;
char *machine = getenv("MACHINE");
@@ -424,12 +425,10 @@ main(argc, argv)
* and modify the paths for the Makefiles apropriately. The
* current directory is also placed as a variable for make scripts.
*/
- if (!(path = getenv("MAKEOBJDIR"))) {
+ if (!(path = getenv("MAKEOBJDIR")))
path = _PATH_OBJDIR;
- (void) sprintf(mdpath, "%s.%s", path, machine);
- }
- else
- (void) strncpy(mdpath, path, MAXPATHLEN + 1);
+ (void) snprintf(mdpath, MAXPATHLEN, "%s%s", path, curdir);
+ realobjdir = mdpath; /* This is where we'd _like_ to be, anyway */
if (stat(mdpath, &sb) == 0 && S_ISDIR(sb.st_mode)) {
@@ -447,27 +446,8 @@ main(argc, argv)
objdir = mdpath;
}
}
- else {
- if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode)) {
-
- if (chdir(path)) {
- (void)fprintf(stderr, "make warning: %s: %s.\n",
- path, strerror(errno));
- objdir = curdir;
- }
- else {
- if (path[0] != '/') {
- (void) sprintf(obpath, "%s/%s", curdir,
- path);
- objdir = obpath;
- }
- else
- objdir = obpath;
- }
- }
- else
- objdir = curdir;
- }
+ else
+ objdir = curdir;
setenv("PWD", objdir, 1);
@@ -509,6 +489,7 @@ main(argc, argv)
if (objdir != curdir)
Dir_AddDir(dirSearchPath, curdir);
Var_Set(".CURDIR", curdir, VAR_GLOBAL);
+ Var_Set(".TARGETOBJDIR", realobjdir, VAR_GLOBAL);
Var_Set(".OBJDIR", objdir, VAR_GLOBAL);
/*
diff --git a/usr.bin/make/pathnames.h b/usr.bin/make/pathnames.h
index 2c25ead53ed5..a96942c6cf81 100644
--- a/usr.bin/make/pathnames.h
+++ b/usr.bin/make/pathnames.h
@@ -31,10 +31,10 @@
* SUCH DAMAGE.
*
* from: @(#)pathnames.h 5.2 (Berkeley) 6/1/90
- * $Id: pathnames.h,v 1.2 1993/08/01 18:11:58 mycroft Exp $
+ * $Id: pathnames.h,v 1.2 1995/01/23 21:01:52 jkh Exp $
*/
-#define _PATH_OBJDIR "obj"
+#define _PATH_OBJDIR "/usr/obj"
#define _PATH_DEFSHELLDIR "/bin"
#define _PATH_DEFSYSMK "/usr/share/mk/sys.mk"
#define _PATH_DEFSYSPATH "/usr/share/mk"
diff --git a/usr.bin/mklocale/data/Makefile b/usr.bin/mklocale/data/Makefile
index fb6161fedf1b..809390e471a3 100644
--- a/usr.bin/mklocale/data/Makefile
+++ b/usr.bin/mklocale/data/Makefile
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: Makefile,v 1.2 1995/11/03 14:51:45 ache Exp $
NOMAN=YES
CLEANFILES+= ${LOCALES:S/$/.out/g}
@@ -6,8 +6,8 @@ CLEANFILES+= ${LOCALES:S/$/.out/g}
LOCALES= ja_JP.EUC ru_SU.KOI8-R lt_LN.ASCII lt_LN.ISO_8859-1 ru_SU.CP866
LOCALEDIR= ${DESTDIR}/usr/share/locale
-.if exists(${.CURDIR}/../obj)
-MKLOCALE=${.CURDIR}/../obj/mklocale
+.if exists(${.OBJDIR}/..)
+MKLOCALE=${.OBJDIR}/../mklocale
.else
MKLOCALE=${.CURDIR}/../mklocale
.endif
diff --git a/usr.bin/sgmls/Makefile.inc b/usr.bin/sgmls/Makefile.inc
index bf94a8dfcff6..e1ed57f18531 100644
--- a/usr.bin/sgmls/Makefile.inc
+++ b/usr.bin/sgmls/Makefile.inc
@@ -1,15 +1,15 @@
#
# Bmakefile for rast
#
-# $Id: Makefile.inc,v 1.2 1996/06/04 19:08:04 jfieber Exp $
+# $Id: Makefile.inc,v 1.3 1996/06/19 20:36:35 jkh Exp $
#
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif
-.if exists(${.CURDIR}/../libsgmls/obj)
-LIBSGMLS= ${.CURDIR}/../libsgmls/obj/libsgmls.a
+.if exists(${.OBJDIR}/../libsgmls)
+LIBSGMLS= ${.OBJDIR}/../libsgmls/libsgmls.a
.else
LIBSGMLS= ${.CURDIR}/../libsgmls/libsgmls.a
.endif
diff --git a/usr.bin/tip/tip/Makefile b/usr.bin/tip/tip/Makefile
index c97a9297596a..ece08034b0bb 100644
--- a/usr.bin/tip/tip/Makefile
+++ b/usr.bin/tip/tip/Makefile
@@ -7,8 +7,8 @@
# /var/log/aculog ACU accounting file, owned by ${OWNER} and
# mode 6?? {if ACULOG defined}
-.if exists(${.CURDIR}/../libacu/obj)
-LIBACU=${.CURDIR}/../libacu/obj/libacu.a
+.if exists(${.OBJDIR}/../libacu)
+LIBACU=${.OBJDIR}/../libacu/libacu.a
.else
LIBACU=${.CURDIR}/../libacu/libacu.a
.endif
diff --git a/usr.bin/tn3270/mset/Makefile b/usr.bin/tn3270/mset/Makefile
index 53af87fb6f43..db31b2e72193 100644
--- a/usr.bin/tn3270/mset/Makefile
+++ b/usr.bin/tn3270/mset/Makefile
@@ -14,8 +14,8 @@ CLEANFILES+= astosc.OUT astosc.out
DEPSRCS+= astosc.OUT map3270.c mset.c
-.if exists(${.CURDIR}/../tools/mkastosc/obj)
-MKOBJ=${.CURDIR}/../tools/mkastosc/obj
+.if exists(${.OBJDIR}/../tools/mkastosc)
+MKOBJ=${.OBJDIR}/../tools/mkastosc
.else
MKOBJ=${.CURDIR}/../tools/mkastosc
.endif
diff --git a/usr.bin/tn3270/tn3270/Makefile b/usr.bin/tn3270/tn3270/Makefile
index 75f029df2dcc..7dd19528b7cc 100644
--- a/usr.bin/tn3270/tn3270/Makefile
+++ b/usr.bin/tn3270/tn3270/Makefile
@@ -30,26 +30,26 @@ DEPSRCS+= genbsubs.c globals.c system.c termout.c
DEPSRCS+= commands.c main.c network.c ring.c sys_bsd.c telnet.c terminal.c
DEPSRCS+= tn3270.c utilities.c
-.if exists(${.CURDIR}/../tools/mkastosc/obj)
-MKASTOSCDIR= ${.CURDIR}/../tools/mkastosc/obj
+.if exists(${.OBJDIR}/../tools/mkastosc)
+MKASTOSCDIR= ${.OBJDIR}/../tools/mkastosc
.else
MKASTOSCDIR= ${.CURDIR}/../tools/mkastosc
.endif
-.if exists(${.CURDIR}/../tools/mkastods/obj)
-MKASTODSDIR= ${.CURDIR}/../tools/mkastods/obj
+.if exists(${.OBJDIR}/../tools/mkastods)
+MKASTODSDIR= ${.OBJDIR}/../tools/mkastods
.else
MKASTODSDIR= ${.CURDIR}/../tools/mkastods
.endif
-.if exists(${.CURDIR}/../tools/mkdstoas/obj)
-MKDSTOASDIR= ${.CURDIR}/../tools/mkdstoas/obj
+.if exists(${.OBJDIR}/../tools/mkdstoas)
+MKDSTOASDIR= ${.OBJDIR}/../tools/mkdstoas
.else
MKDSTOASDIR= ${.CURDIR}/../tools/mkdstoas
.endif
-.if exists(${.CURDIR}/../tools/mkhits/obj)
-MKHITSDIR= ${.CURDIR}/../tools/mkhits/obj
+.if exists(${.OBJDIR}/../tools/mkhits)
+MKHITSDIR= ${.OBJDIR}/../tools/mkhits
.else
MKHITSDIR= ${.CURDIR}/../tools/mkhits
.endif
diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile
index 905c3ec02388..27d2a3a807d5 100644
--- a/usr.sbin/cron/cron/Makefile
+++ b/usr.sbin/cron/cron/Makefile
@@ -4,9 +4,9 @@ PROG= cron
SRCS= cron.c database.c do_command.c job.c user.c popen.c
MAN8= cron.8
-.if exists(${.CURDIR}/../lib/obj)
-LDDESTDIR+= -L${.CURDIR}/../lib/obj
-DPADD+= ${.CURDIR}/../lib/obj/libcron.a
+.if exists(${.OBJDIR}/../lib)
+LDDESTDIR+= -L${.OBJDIR}/../lib
+DPADD+= ${.OBJDIR}/../lib/libcron.a
.else
LDDESTDIR+= -L${.CURDIR}/../lib
DPADD+= ${.CURDIR}/../lib/libcron.a
diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile
index 09a1fdc090bd..cce341db6cae 100644
--- a/usr.sbin/cron/crontab/Makefile
+++ b/usr.sbin/cron/crontab/Makefile
@@ -6,9 +6,9 @@ CFLAGS+= -I${.CURDIR}/../cron
MAN1= crontab.1
MAN5= crontab.5
-.if exists(${.CURDIR}/../lib/obj)
-LDDESTDIR+= -L${.CURDIR}/../lib/obj
-DPADD+= ${.CURDIR}/../lib/obj/libcron.a
+.if exists(${.OBJDIR}/../lib)
+LDDESTDIR+= -L${.OBJDIR}/../lib
+DPADD+= ${.OBJDIR}/../lib/libcron.a
.else
LDDESTDIR+= -L${.CURDIR}/../lib
DPADD+= ${.CURDIR}/../lib/libcron.a
diff --git a/usr.sbin/mrouted/map-mbone/Makefile b/usr.sbin/mrouted/map-mbone/Makefile
index b7073444a28f..2110b320cf79 100644
--- a/usr.sbin/mrouted/map-mbone/Makefile
+++ b/usr.sbin/mrouted/map-mbone/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1994/09/08 02:51:33 wollman Exp $
+# $Id: Makefile,v 1.2 1995/03/31 21:16:56 wollman Exp $
PROG= map-mbone
@@ -6,9 +6,9 @@ S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
-.if exists($S/common/obj)
-LDDESTDIR+= -L$S/common/obj
-DPADD+= $S/common/obj/libmrouted.a
+.if exists(${.OBJDIR}/../common)
+LDDESTDIR+= -L${.OBJDIR}/../common
+DPADD+= ${.OBJDIR}/../common/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
diff --git a/usr.sbin/mrouted/mrinfo/Makefile b/usr.sbin/mrouted/mrinfo/Makefile
index fdf83fcdae68..34d51cd2ef92 100644
--- a/usr.sbin/mrouted/mrinfo/Makefile
+++ b/usr.sbin/mrouted/mrinfo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.3 1995/06/21 18:30:10 wollman Exp $
+# $Id: Makefile,v 1.4 1996/05/20 16:42:30 pst Exp $
PROG= mrinfo
@@ -6,9 +6,9 @@ S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
-.if exists($S/common/obj)
-LDDESTDIR+= -L$S/common/obj
-DPADD+= $S/common/obj/libmrouted.a
+.if exists(${.OBJDIR}/../common)
+LDDESTDIR+= -L${.OBJDIR}/../common
+DPADD+= ${.OBJDIR}/../common/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
diff --git a/usr.sbin/mrouted/mrouted/Makefile b/usr.sbin/mrouted/mrouted/Makefile
index dca5762dd324..1c5dcc5207fd 100644
--- a/usr.sbin/mrouted/mrouted/Makefile
+++ b/usr.sbin/mrouted/mrouted/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 1995/06/13 18:05:16 wollman Exp $
+# $Id: Makefile,v 1.3 1995/07/08 22:36:06 ats Exp $
PROG= mrouted
@@ -6,9 +6,9 @@ S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
-.if exists($S/common/obj)
-LDDESTDIR+= -L$S/common/obj
-DPADD+= $S/common/obj/libmrouted.a
+.if exists(${.OBJDIR}/../common)
+LDDESTDIR+= -L${.OBJDIR}/../common
+DPADD+= ${.OBJDIR}/../common/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
diff --git a/usr.sbin/mrouted/mtrace/Makefile b/usr.sbin/mrouted/mtrace/Makefile
index 0d17ec09b312..6e79dea88f4b 100644
--- a/usr.sbin/mrouted/mtrace/Makefile
+++ b/usr.sbin/mrouted/mtrace/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 1995/06/21 18:30:16 wollman Exp $
+# $Id: Makefile,v 1.3 1996/05/20 16:42:32 pst Exp $
PROG= mtrace
@@ -6,9 +6,9 @@ S= ${.CURDIR}/..
.PATH: $S
CFLAGS+= -I$S
LDADD+= -lmrouted
-.if exists($S/common/obj)
-LDDESTDIR+= -L$S/common/obj
-DPADD+= $S/common/obj/libmrouted.a
+.if exists(${.OBJDIR}/../common)
+LDDESTDIR+= -L${.OBJDIR}/../common
+DPADD+= ${.OBJDIR}/../common/libmrouted.a
.else
LDDESTDIR+= -L$S/common
DPADD+= $S/common/libmrouted.a
diff --git a/usr.sbin/pcvt/kbdio/Makefile b/usr.sbin/pcvt/kbdio/Makefile
index c67b3f650e8e..398736fc03d8 100644
--- a/usr.sbin/pcvt/kbdio/Makefile
+++ b/usr.sbin/pcvt/kbdio/Makefile
@@ -25,7 +25,7 @@ LDADD= -lm -ly -ll
NOMAN=
NOSHARED= no shared linkage
-CFLAGS+= -I${.CURDIR}/obj -I${.CURDIR} #-g
+CFLAGS+= -I${.OBJDIR} -I${.CURDIR} #-g
CLEANFILES+= kbdio.c lex.c lex.yy.c y.tab.[ch]
CLEANFILES+= y.output # comment file from bison
diff --git a/usr.sbin/pcvt/kcon/Makefile b/usr.sbin/pcvt/kcon/Makefile
index 4826870f5b9c..dee4f45b368c 100644
--- a/usr.sbin/pcvt/kcon/Makefile
+++ b/usr.sbin/pcvt/kcon/Makefile
@@ -5,6 +5,6 @@ CFLAGS+= -I${.CURDIR}/../keycap -DKEYB_DEVICE=\"${DEVICE}\"
# the -Lfoo could be omitted if libkeycap.a were installed before
# making those programs here
-LDADD = -L${.CURDIR}/../keycap -L${.CURDIR}/../keycap/obj -lkeycap
+LDADD = -L${.CURDIR}/../keycap -L${.OBJDIR}/../keycap -lkeycap
.include <bsd.prog.mk>
diff --git a/usr.sbin/pcvt/vgaio/Makefile b/usr.sbin/pcvt/vgaio/Makefile
index b26b8ebb7d80..53083e052a22 100644
--- a/usr.sbin/pcvt/vgaio/Makefile
+++ b/usr.sbin/pcvt/vgaio/Makefile
@@ -24,7 +24,7 @@ DPADD= ${LIBM} ${LIBY} ${LIBL}
LDADD= -lm -ly -ll
CFLAGS= -O2 # due to a gcc bug, it compiles only with -O2!
-CFLAGS+= -I${.CURDIR}/obj -I${.CURDIR}
+CFLAGS+= -I${.OBJDIR} -I${.CURDIR}
CLEANFILES+= lex.c lex.yy.c vgaio.c y.tab.[ch]
CLEANFILES+= y.output # comment file from bison
diff --git a/usr.sbin/pkg_install/add/Makefile b/usr.sbin/pkg_install/add/Makefile
index ade7e57a0d29..723ca45919b9 100644
--- a/usr.sbin/pkg_install/add/Makefile
+++ b/usr.sbin/pkg_install/add/Makefile
@@ -2,9 +2,9 @@ PROG= pkg_add
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj -linstall
-DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib -linstall
+DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
diff --git a/usr.sbin/pkg_install/create/Makefile b/usr.sbin/pkg_install/create/Makefile
index fda22e7a9b5f..26d57e4958fc 100644
--- a/usr.sbin/pkg_install/create/Makefile
+++ b/usr.sbin/pkg_install/create/Makefile
@@ -2,9 +2,9 @@ PROG= pkg_create
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj -linstall
-DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib -linstall
+DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
diff --git a/usr.sbin/pkg_install/delete/Makefile b/usr.sbin/pkg_install/delete/Makefile
index 38c6802a10a9..9fd098007d9a 100644
--- a/usr.sbin/pkg_install/delete/Makefile
+++ b/usr.sbin/pkg_install/delete/Makefile
@@ -1,9 +1,9 @@
PROG= pkg_delete
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj -linstall
-DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib -linstall
+DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
diff --git a/usr.sbin/pkg_install/info/Makefile b/usr.sbin/pkg_install/info/Makefile
index 8c5098cad5b3..9ab8dc38fce2 100644
--- a/usr.sbin/pkg_install/info/Makefile
+++ b/usr.sbin/pkg_install/info/Makefile
@@ -1,9 +1,9 @@
PROG= pkg_info
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj -linstall
-DPADD+= ${.CURDIR}/../lib/obj/libinstall.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib -linstall
+DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
diff --git a/usr.sbin/sup/sup/Makefile b/usr.sbin/sup/sup/Makefile
index 5b53b91b41fc..7deb8d219647 100644
--- a/usr.sbin/sup/sup/Makefile
+++ b/usr.sbin/sup/sup/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 1995/12/26 22:33:03 peter Exp $
+# $Id: Makefile,v 1.3 1995/12/26 22:39:27 peter Exp $
PROG= sup
SRCS= supcmain.c supcvers.c supcparse.c supcname.c supcmisc.c supcmeat.c
@@ -7,8 +7,8 @@ LIBSRC= ${.CURDIR}/../lib
COPTS+= -DVAR_TMP -DHAS_DAEMON -I${.CURDIR} -I${LIBSRC}
COPTS+= -DRENAMELOG=\"/var/log/sup.rename\"
-.if exists(${LIBSRC}/obj/.)
-LIBOBJ= ${LIBSRC}/obj
+.if exists(${.OBJDIR}/../lib)
+LIBOBJ= ${.OBJDIR}/../lib
.else
LIBOBJ= ${LIBSRC}
.endif
diff --git a/usr.sbin/sup/supfilesrv/Makefile b/usr.sbin/sup/supfilesrv/Makefile
index 53fff4539b37..c2a1c886e0a7 100644
--- a/usr.sbin/sup/supfilesrv/Makefile
+++ b/usr.sbin/sup/supfilesrv/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 1996/02/06 19:03:56 pst Exp $
+# $Id: Makefile,v 1.3 1996/02/06 19:04:41 pst Exp $
PROG= supfilesrv
SRCS= supfilesrv.c
@@ -9,8 +9,8 @@ LIBSRC= ${.CURDIR}/../lib
COPTS+= -DVAR_TMP -DHAS_DAEMON -I${.CURDIR} -I${LIBSRC}
COPTS+= -DRENAMELOG=\"/var/log/sup.rename\"
-.if exists(${LIBSRC}/obj/.)
-LIBOBJ= ${LIBSRC}/obj
+.if exists(${.OBJDIR}/../lib)
+LIBOBJ= ${.OBJDIR}/../lib
.else
LIBOBJ= ${LIBSRC}
.endif
diff --git a/usr.sbin/sup/supscan/Makefile b/usr.sbin/sup/supscan/Makefile
index 7268d71988af..f96d7328ab98 100644
--- a/usr.sbin/sup/supscan/Makefile
+++ b/usr.sbin/sup/supscan/Makefile
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: Makefile,v 1.1 1995/12/26 05:15:20 peter Exp $
PROG= supscan
SRCS= supscan.c
@@ -8,8 +8,8 @@ LIBSRC= ${.CURDIR}/../lib
COPTS+= -DVAR_TMP -DHAS_DAEMON -I${.CURDIR} -I${LIBSRC}
COPTS+= -DRENAMELOG=\"/var/log/sup.rename\"
-.if exists(${LIBSRC}/obj/.)
-LIBOBJ= ${LIBSRC}/obj
+.if exists(${.OBJDIR}/../lib)
+LIBOBJ= ${.OBJDIR}/../lib
.else
LIBOBJ= ${LIBSRC}
.endif
diff --git a/usr.sbin/xntpd/authstuff/Makefile b/usr.sbin/xntpd/authstuff/Makefile
index 79b2d9d675e3..902848f375df 100644
--- a/usr.sbin/xntpd/authstuff/Makefile
+++ b/usr.sbin/xntpd/authstuff/Makefile
@@ -1,5 +1,5 @@
#
-# $Id: Makefile,v 1.1 1993/12/21 21:06:20 wollman Exp $
+# $Id: Makefile,v 1.2 1993/12/22 11:32:10 rgrimes Exp $
#
# Most of the programs in this directory are completely useless for the
# NTP configuration that we provide by default.
@@ -7,9 +7,9 @@
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= ${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= ${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= ${.CURDIR}/../lib/libntp.a
diff --git a/usr.sbin/xntpd/ntpdate/Makefile b/usr.sbin/xntpd/ntpdate/Makefile
index f0af84001c3d..d1a9dd96e558 100644
--- a/usr.sbin/xntpd/ntpdate/Makefile
+++ b/usr.sbin/xntpd/ntpdate/Makefile
@@ -1,12 +1,12 @@
#
-# $Id: Makefile,v 1.3 1993/12/22 11:32:56 rgrimes Exp $
+# $Id: Makefile,v 1.4 1994/10/03 23:51:17 phk Exp $
#
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= -L${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= -L${.CURDIR}/../lib/libntp.a
diff --git a/usr.sbin/xntpd/ntpq/Makefile b/usr.sbin/xntpd/ntpq/Makefile
index 875592a889c6..4ba9f07fb703 100644
--- a/usr.sbin/xntpd/ntpq/Makefile
+++ b/usr.sbin/xntpd/ntpq/Makefile
@@ -1,12 +1,12 @@
#
-# $Id: Makefile,v 1.3 1993/12/22 11:33:07 rgrimes Exp $
+# $Id: Makefile,v 1.4 1994/10/03 23:51:22 phk Exp $
#
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= -L${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= -L${.CURDIR}/../lib/libntp.a
diff --git a/usr.sbin/xntpd/ntptrace/Makefile b/usr.sbin/xntpd/ntptrace/Makefile
index 5d5f32766de0..1334dfd5b681 100644
--- a/usr.sbin/xntpd/ntptrace/Makefile
+++ b/usr.sbin/xntpd/ntptrace/Makefile
@@ -1,12 +1,12 @@
#
-# $Id: Makefile,v 1.2 1993/12/22 11:33:14 rgrimes Exp $
+# $Id: Makefile,v 1.3 1994/10/03 23:51:26 phk Exp $
#
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= -L${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= -L${.CURDIR}/../lib/libntp.a
diff --git a/usr.sbin/xntpd/parse/util/Makefile b/usr.sbin/xntpd/parse/util/Makefile
index ad9c0eb45470..a05ca0838d50 100644
--- a/usr.sbin/xntpd/parse/util/Makefile
+++ b/usr.sbin/xntpd/parse/util/Makefile
@@ -1,14 +1,14 @@
#
-# $Id$
+# $Id: Makefile,v 1.2 1995/04/04 17:48:02 rgrimes Exp $
#
CFLAGS+= -I${.CURDIR}/../../include
CFLAGS+= -DNTP_POSIX_SOURCE -DUSE_PROTOTYPES
CFLAGS+= -DSYS_FREEBSD -DBOEDER -DHAVE_TERMIOS -DHAVE_BSD_NICE
-.if exists(${.CURDIR}/../../lib/obj)
-LDADD+= -L${.CURDIR}/../../lib/obj
-DPADD+= -L${.CURDIR}/../../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../../lib)
+LDADD+= -L${.OBJDIR}/../../lib
+DPADD+= -L${.OBJDIR}/../../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../../lib
DPADD+= -L${.CURDIR}/../../lib/libntp.a
diff --git a/usr.sbin/xntpd/util/Makefile b/usr.sbin/xntpd/util/Makefile
index 02cb294eaee1..04f35870e643 100644
--- a/usr.sbin/xntpd/util/Makefile
+++ b/usr.sbin/xntpd/util/Makefile
@@ -1,12 +1,12 @@
#
-# $Id: Makefile,v 1.2 1993/12/22 11:33:28 rgrimes Exp $
+# $Id: Makefile,v 1.3 1994/10/03 23:51:29 phk Exp $
#
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= -L${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= -L${.CURDIR}/../lib/libntp.a
diff --git a/usr.sbin/xntpd/xntpd/Makefile b/usr.sbin/xntpd/xntpd/Makefile
index 6ab7cd0774ba..a1de730a6bf1 100644
--- a/usr.sbin/xntpd/xntpd/Makefile
+++ b/usr.sbin/xntpd/xntpd/Makefile
@@ -1,20 +1,20 @@
#
-# $Id: Makefile,v 1.6 1994/09/30 00:34:17 wollman Exp $
+# $Id: Makefile,v 1.7 1994/10/03 23:51:32 phk Exp $
#
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= ${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= ${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= ${.CURDIR}/../lib/libntp.a
.endif
-.if exists(${.CURDIR}/../parse/obj)
-LDADD+= -L${.CURDIR}/../parse/obj
-DPADD+= ${.CURDIR}/../parse/obj/libparse.a
+.if exists(${.OBJDIR}/../parse)
+LDADD+= -L${.OBJDIR}/../parse
+DPADD+= ${.OBJDIR}/../parse/libparse.a
.else
LDADD+= -L${.CURDIR}/../parse
DPADD+= ${.CURDIR}/../parse/libparse.a
diff --git a/usr.sbin/xntpd/xntpdc/Makefile b/usr.sbin/xntpd/xntpdc/Makefile
index a06cf1a0f83e..254307496296 100644
--- a/usr.sbin/xntpd/xntpdc/Makefile
+++ b/usr.sbin/xntpd/xntpdc/Makefile
@@ -1,12 +1,12 @@
#
-# $Id: Makefile,v 1.2 1993/12/22 11:34:00 rgrimes Exp $
+# $Id: Makefile,v 1.3 1994/10/03 23:51:34 phk Exp $
#
CFLAGS+= -I${.CURDIR}/../include
-.if exists(${.CURDIR}/../lib/obj)
-LDADD+= -L${.CURDIR}/../lib/obj
-DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
+.if exists(${.OBJDIR}/../lib)
+LDADD+= -L${.OBJDIR}/../lib
+DPADD+= -L${.OBJDIR}/../lib/libntp.a
.else
LDADD+= -L${.CURDIR}/../lib
DPADD+= -L${.CURDIR}/../lib/libntp.a