From 2f15ee67243320d906c911e1d8c24806b7bc4ed2 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 7 Mar 1998 09:48:14 +0000 Subject: Use `foo/bar.a' instead of `-Lfoo -lbar' for linking to static internal libraries so that `ld -f' in can create correct dependencies for yet-to-be-built libraries. Get the default BINDIR correctly (by including ../Makefile.inc recursively. Override the default it it is wrong. Don't override defaults when the defaults are correct. --- usr.sbin/cron/cron/Makefile | 19 ++++--------------- usr.sbin/cron/crontab/Makefile | 18 ++++-------------- usr.sbin/lpr/Makefile.inc | 10 +++++++++- usr.sbin/lpr/SMM.doc/Makefile | 3 ++- usr.sbin/lpr/chkprintcap/Makefile | 7 +++---- usr.sbin/lpr/lpc/Makefile | 7 +++---- usr.sbin/lpr/lpd/Makefile | 7 +++---- usr.sbin/lpr/lpq/Makefile | 9 ++++----- usr.sbin/lpr/lpr/Makefile | 7 +++---- usr.sbin/lpr/lprm/Makefile | 11 +++++------ usr.sbin/lpr/lptest/Makefile | 2 -- usr.sbin/lpr/pac/Makefile | 8 +++----- 12 files changed, 43 insertions(+), 65 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile index 81c1df1..e52d31d 100644 --- a/usr.sbin/cron/cron/Makefile +++ b/usr.sbin/cron/cron/Makefile @@ -1,21 +1,10 @@ -BINDIR?= /usr/sbin +# $Id$ PROG= cron SRCS= cron.c database.c do_command.c job.c user.c popen.c -MAN8= cron.8 - CFLAGS+=-DLOGIN_CAP - -.if exists(${.OBJDIR}/../lib) -LDADD+= -L${.OBJDIR}/../lib -DPADD+= ${.OBJDIR}/../lib/libcron.a -.else -LDADD+= -L${.CURDIR}/../lib -DPADD+= ${.CURDIR}/../lib/libcron.a -.endif -LDADD+= -lcron - -LDADD+= -lutil -DPADD+= ${LIBUTIL} +DPADD= ${LIBCRON} ${LIBUTIL} +LDADD= ${LIBCRON} -lutil +MAN8= cron.8 .include diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile index 41c455f..99b6712 100644 --- a/usr.sbin/cron/crontab/Makefile +++ b/usr.sbin/cron/crontab/Makefile @@ -1,23 +1,13 @@ -BINDIR?= /usr/bin +# $Id$ PROG= crontab -SRCS= crontab.c CFLAGS+=-I${.CURDIR}/../cron +DPADD= ${LIBCRON} ${LIBUTIL} +LDADD= ${LIBCRON} -lutil MAN1= crontab.1 MAN5= crontab.5 -.if exists(${.OBJDIR}/../lib) -LDADD+= -L${.OBJDIR}/../lib -DPADD+= ${.OBJDIR}/../lib/libcron.a -.else -LDADD+= -L${.CURDIR}/../lib -DPADD+= ${.CURDIR}/../lib/libcron.a -.endif -LDADD+= -lcron - -LDADD+= -lutil -DPADD+= ${LIBUTIL} - +BINDIR= /usr/bin BINOWN= root BINMODE=4555 INSTALLFLAGS=-fschg diff --git a/usr.sbin/lpr/Makefile.inc b/usr.sbin/lpr/Makefile.inc index 4b65dee..34d4fcb 100644 --- a/usr.sbin/lpr/Makefile.inc +++ b/usr.sbin/lpr/Makefile.inc @@ -1,3 +1,11 @@ -# $Id: Makefile.inc,v 1.1 1997/12/02 20:44:47 wollman Exp $ +# $Id: Makefile.inc,v 1.2 1997/12/17 19:38:30 wollman Exp $ CWARNFLAGS= -Werror -Wall -Wnested-externs -Wmissing-prototypes -Wno-unused + +.if exists(${.OBJDIR}/../common_source) +LIBLPR= ${.OBJDIR}/../common_source/liblpr.a +.else +LIBLPR= ${.CURDIR}/../common_source/liblpr.a +.endif + +.include "../Makefile.inc" diff --git a/usr.sbin/lpr/SMM.doc/Makefile b/usr.sbin/lpr/SMM.doc/Makefile index adf53f8..a59265b 100644 --- a/usr.sbin/lpr/SMM.doc/Makefile +++ b/usr.sbin/lpr/SMM.doc/Makefile @@ -1,6 +1,7 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/8/93 -# $Id: Makefile,v 1.3 1997/02/22 13:05:43 peter Exp $ +# $Id: Makefile,v 1.2 1997/12/02 20:45:05 wollman Exp $ +BINDIR= /usr/share/doc VOLUME= smm/07.lpd SRCS= 0.t 1.t 2.t 3.t 4.t 5.t 6.t 7.t MACROS= -ms diff --git a/usr.sbin/lpr/chkprintcap/Makefile b/usr.sbin/lpr/chkprintcap/Makefile index 3fc24ae..1cbabbf 100644 --- a/usr.sbin/lpr/chkprintcap/Makefile +++ b/usr.sbin/lpr/chkprintcap/Makefile @@ -1,11 +1,10 @@ -# $Id: Makefile,v 1.1 1997/12/02 20:45:07 wollman Exp $ +# $Id: Makefile,v 1.2 1997/12/16 17:53:14 bde Exp $ PROG= chkprintcap MAN8= chkprintcap.8 CFLAGS+=-I${.CURDIR}/../common_source -Wall -Werror .PATH: ${.CURDIR}/../common_source -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} -.include "../../Makefile.inc" .include diff --git a/usr.sbin/lpr/lpc/Makefile b/usr.sbin/lpr/lpc/Makefile index cf3412d..46a4166 100644 --- a/usr.sbin/lpr/lpc/Makefile +++ b/usr.sbin/lpr/lpc/Makefile @@ -1,5 +1,5 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id: Makefile,v 1.3 1997/12/02 20:45:35 wollman Exp $ +# $Id: Makefile,v 1.4 1997/12/16 17:53:19 bde Exp $ PROG= lpc CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS} @@ -8,8 +8,7 @@ SRCS= lpc.c cmds.c cmdtab.c BINGRP= daemon BINMODE=2555 .PATH: ${.CURDIR}/../common_source -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} -.include "../../Makefile.inc" .include diff --git a/usr.sbin/lpr/lpd/Makefile b/usr.sbin/lpr/lpd/Makefile index de9b860..80ea478 100644 --- a/usr.sbin/lpr/lpd/Makefile +++ b/usr.sbin/lpr/lpd/Makefile @@ -1,12 +1,11 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id: Makefile,v 1.4 1997/12/02 20:45:52 wollman Exp $ +# $Id: Makefile,v 1.5 1997/12/16 17:53:25 bde Exp $ PROG= lpd CFLAGS+=-I${.CURDIR}/../common_source -Wall -Werror MAN8= lpd.8 SRCS= lpd.c printjob.c recvjob.c lpdchar.c modes.c -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} -.include "../../Makefile.inc" .include diff --git a/usr.sbin/lpr/lpq/Makefile b/usr.sbin/lpr/lpq/Makefile index 7b2cdc4..7668499 100644 --- a/usr.sbin/lpr/lpq/Makefile +++ b/usr.sbin/lpr/lpq/Makefile @@ -1,15 +1,14 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id: Makefile,v 1.3 1997/12/02 20:46:03 wollman Exp $ +# $Id: Makefile,v 1.4 1997/12/16 17:53:28 bde Exp $ PROG= lpq CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS} -SRCS= lpq.c +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} + BINOWN= root BINGRP= daemon BINMODE=6555 BINDIR= /usr/bin -MAN1= lpq.1 -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr .include diff --git a/usr.sbin/lpr/lpr/Makefile b/usr.sbin/lpr/lpr/Makefile index fbd72d4..dc32d51 100644 --- a/usr.sbin/lpr/lpr/Makefile +++ b/usr.sbin/lpr/lpr/Makefile @@ -1,9 +1,8 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id: Makefile,v 1.4 1997/12/16 17:53:31 bde Exp $ +# $Id: Makefile,v 1.5 1998/02/04 15:59:10 wollman Exp $ PROG= lpr CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS} -SRCS= lpr.c BINOWN= root BINGRP= daemon BINMODE=6555 @@ -11,7 +10,7 @@ BINDIR= /usr/bin MAN1= lpr.1 MAN5= printcap.5 .PATH: ${.CURDIR}/../common_source -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} .include diff --git a/usr.sbin/lpr/lprm/Makefile b/usr.sbin/lpr/lprm/Makefile index 47e46c1..9e26d7c 100644 --- a/usr.sbin/lpr/lprm/Makefile +++ b/usr.sbin/lpr/lprm/Makefile @@ -1,16 +1,15 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id: Makefile,v 1.4 1997/12/16 17:53:35 bde Exp $ +# $Id: Makefile,v 1.5 1997/12/17 19:38:33 wollman Exp $ PROG= lprm CFLAGS+=-I${.CURDIR}/../common_source ${CWARNFLAGS} -SRCS= lprm.c +.PATH: ${.CURDIR}/../common_source +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} + BINOWN= root BINGRP= daemon BINMODE=6555 BINDIR= /usr/bin -MAN1= lprm.1 -.PATH: ${.CURDIR}/../common_source -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr .include diff --git a/usr.sbin/lpr/lptest/Makefile b/usr.sbin/lpr/lptest/Makefile index 8492b69..fe13560 100644 --- a/usr.sbin/lpr/lptest/Makefile +++ b/usr.sbin/lpr/lptest/Makefile @@ -1,7 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= lptest -MAN1= lptest.1 -.include "../../Makefile.inc" .include diff --git a/usr.sbin/lpr/pac/Makefile b/usr.sbin/lpr/pac/Makefile index 188dcc8..9e0b03f 100644 --- a/usr.sbin/lpr/pac/Makefile +++ b/usr.sbin/lpr/pac/Makefile @@ -1,13 +1,11 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $Id: Makefile,v 1.3 1997/12/02 20:46:18 wollman Exp $ +# $Id: Makefile,v 1.4 1997/12/16 17:53:39 bde Exp $ PROG= pac CFLAGS+=-I${.CURDIR}/../common_source MAN8= pac.8 -SRCS= pac.c .PATH: ${.CURDIR}/../common_source -DPADD= ${.OBJDIR}/../common_source/liblpr.a -LDADD= -L${.OBJDIR}/../common_source -llpr +DPADD= ${LIBLPR} +LDADD= ${LIBLPR} -.include "../../Makefile.inc" .include -- cgit v1.1