From 9b21dc9931983bf7ddd427e2f066596771a4a0d5 Mon Sep 17 00:00:00 2001 From: "J.T. Conklin" Date: Fri, 9 Jul 1993 16:15:13 +0000 Subject: [PATCH] Update makefiles: centralize obj/noobj conditional in Makefile.inc use DPADD don't compile profiling library install rcsfreeze correctly After this commit, the freebsd and netbsd rcs distribution will be in sync. --- gnu/usr.bin/rcs/Makefile.inc | 8 ++++++-- gnu/usr.bin/rcs/ci/Makefile | 12 ++++-------- gnu/usr.bin/rcs/co/Makefile | 12 ++++-------- gnu/usr.bin/rcs/ident/Makefile | 12 ++++-------- gnu/usr.bin/rcs/lib/Makefile | 3 ++- gnu/usr.bin/rcs/merge/Makefile | 12 ++++-------- gnu/usr.bin/rcs/rcs/Makefile | 16 ++++++---------- gnu/usr.bin/rcs/rcsclean/Makefile | 12 ++++-------- gnu/usr.bin/rcs/rcsdiff/Makefile | 12 ++++-------- gnu/usr.bin/rcs/rcsfreeze/Makefile | 13 +++++++------ gnu/usr.bin/rcs/rcsmerge/Makefile | 12 ++++-------- gnu/usr.bin/rcs/rlog/Makefile | 12 ++++-------- 12 files changed, 53 insertions(+), 83 deletions(-) diff --git a/gnu/usr.bin/rcs/Makefile.inc b/gnu/usr.bin/rcs/Makefile.inc index b9eca7d52190..cd593eda1c7c 100644 --- a/gnu/usr.bin/rcs/Makefile.inc +++ b/gnu/usr.bin/rcs/Makefile.inc @@ -1,3 +1,7 @@ -# @(#)Makefile.inc 5.1 (Berkeley) 5/11/90 +# Location of librcs -BINDIR?= /usr/bin +.if exists(${.CURDIR}/../lib/obj) +LIBRCS= ${.CURDIR}/../lib/obj/librcs.a +.else +LIBRCS= ${.CURDIR}/../lib/librcs.a +.endif diff --git a/gnu/usr.bin/rcs/ci/Makefile b/gnu/usr.bin/rcs/ci/Makefile index 6962c55a59d4..3ac3d29abe86 100644 --- a/gnu/usr.bin/rcs/ci/Makefile +++ b/gnu/usr.bin/rcs/ci/Makefile @@ -1,12 +1,8 @@ -PROG= ci +PROG= ci SRCS= ci.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/co/Makefile b/gnu/usr.bin/rcs/co/Makefile index 6896d6f4e8ae..a759d1fa4a15 100644 --- a/gnu/usr.bin/rcs/co/Makefile +++ b/gnu/usr.bin/rcs/co/Makefile @@ -1,12 +1,8 @@ -PROG= co +PROG= co SRCS= co.c -.if exists(${.CURDIR}/../lib/obj) - -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/ident/Makefile b/gnu/usr.bin/rcs/ident/Makefile index 281abdeb9c9f..25e028bf64e4 100644 --- a/gnu/usr.bin/rcs/ident/Makefile +++ b/gnu/usr.bin/rcs/ident/Makefile @@ -1,12 +1,8 @@ -PROG= ident +PROG= ident SRCS= ident.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/lib/Makefile b/gnu/usr.bin/rcs/lib/Makefile index bd723b85a862..8428686b10ac 100644 --- a/gnu/usr.bin/rcs/lib/Makefile +++ b/gnu/usr.bin/rcs/lib/Makefile @@ -7,7 +7,8 @@ SRCS = maketime.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \ rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcsutil.c \ merger.c +NOPROFILE=noprofile + install: - @echo -n .include diff --git a/gnu/usr.bin/rcs/merge/Makefile b/gnu/usr.bin/rcs/merge/Makefile index 57ca047bff75..9022bc4bf6e5 100644 --- a/gnu/usr.bin/rcs/merge/Makefile +++ b/gnu/usr.bin/rcs/merge/Makefile @@ -1,12 +1,8 @@ -PROG= merge +PROG= merge SRCS= merge.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/rcs/Makefile b/gnu/usr.bin/rcs/rcs/Makefile index 363d7e312e5f..806d1d2db5e3 100644 --- a/gnu/usr.bin/rcs/rcs/Makefile +++ b/gnu/usr.bin/rcs/rcs/Makefile @@ -1,15 +1,11 @@ -PROG= rcs +PROG= rcs SRCS= rcs.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} -MAN1= rcs.1 rcsintro.1 -MAN5= rcsfile.5 +MAN1= rcs.0 rcsintro.0 +MAN5= rcsfile.0 +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/rcsclean/Makefile b/gnu/usr.bin/rcs/rcsclean/Makefile index 0cd737d5a13c..2651a3f4b61d 100644 --- a/gnu/usr.bin/rcs/rcsclean/Makefile +++ b/gnu/usr.bin/rcs/rcsclean/Makefile @@ -1,12 +1,8 @@ -PROG= rcsclean +PROG= rcsclean SRCS= rcsclean.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/rcsdiff/Makefile b/gnu/usr.bin/rcs/rcsdiff/Makefile index 6f7d92f58968..070e231bf7b4 100644 --- a/gnu/usr.bin/rcs/rcsdiff/Makefile +++ b/gnu/usr.bin/rcs/rcsdiff/Makefile @@ -1,12 +1,8 @@ -PROG= rcsdiff +PROG= rcsdiff SRCS= rcsdiff.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/rcsfreeze/Makefile b/gnu/usr.bin/rcs/rcsfreeze/Makefile index 2bf3dd426450..f0b9032e5a92 100644 --- a/gnu/usr.bin/rcs/rcsfreeze/Makefile +++ b/gnu/usr.bin/rcs/rcsfreeze/Makefile @@ -1,7 +1,8 @@ -# Do nothing for the following -obj clean cleandir depend rcsfreeze all: - @echo -n +MAN1= rcsfreeze.0 -install: - install -c -o bin -g bin -m 555 rcsfreeze.sh /usr/bin/rcsfreeze - install -c -o bin -g bin -m 444 rcsfreeze.1 /usr/share/man/man1 +afterinstall: + install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ + ${.CURDIR}/rcsfreeze.sh ${DESTDIR}${BINDIR}/rcsfreeze + +.include "../../Makefile.inc" +.include diff --git a/gnu/usr.bin/rcs/rcsmerge/Makefile b/gnu/usr.bin/rcs/rcsmerge/Makefile index c927b468fccf..801b01ee6906 100644 --- a/gnu/usr.bin/rcs/rcsmerge/Makefile +++ b/gnu/usr.bin/rcs/rcsmerge/Makefile @@ -1,12 +1,8 @@ -PROG= rcsmerge +PROG= rcsmerge SRCS= rcsmerge.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include diff --git a/gnu/usr.bin/rcs/rlog/Makefile b/gnu/usr.bin/rcs/rlog/Makefile index 96fe01ee58e7..a1d19aad829e 100644 --- a/gnu/usr.bin/rcs/rlog/Makefile +++ b/gnu/usr.bin/rcs/rlog/Makefile @@ -1,12 +1,8 @@ -PROG= rlog +PROG= rlog SRCS= rlog.c - -.if exists(${.CURDIR}/../lib/obj) -LDADD= -L${.CURDIR}/../lib/obj -lrcs -.else -LDADD= -L${.CURDIR}/../lib/ -lrcs -.endif - CFLAGS+= -I${.CURDIR}/../lib +LDADD= ${LIBRCS} +DPADD= ${LIBRCS} +.include "../../Makefile.inc" .include