head	1.11;
access;
symbols
	RELENG_2_1_7_RELEASE:1.8
	RELENG_2_1_6_1_RELEASE:1.8
	RELENG_2_1_6_RELEASE:1.8
	RELENG_2_1_5_RELEASE:1.8
	RELENG_2_1_0_RELEASE:1.8
	RELENG_2_1_0:1.8.0.6
	RELENG_2_1_0_BP:1.8
	RELENG_2_0_5_RELEASE:1.8
	RELENG_2_0_5:1.8.0.4
	RELENG_2_0_5_BP:1.8
	RELENG_2_0_5_ALPHA:1.8
	RELEASE_2_0:1.8
	BETA_2_0:1.8
	ALPHA_2_0:1.8.0.2
	MOVED_NEWCVS:1.7
	FINAL_1_1_5:1.7
	ALPHA_1_1_5:1.7
	FINAL_1_1:1.5
	GAMMA_1_1:1.5
	BETA_1_1:1.5.0.2
	BP_BETA_1_1:1.5
	FINAL_1_0:1.5
	EPSILON_1_0:1.5
	GAMMA_1_0:1.5
	BETA_1_0:1.5
	ALPHA_1_0:1.2
	man_1_1:1.1.1.1
	man:1.1.1;
locks; strict;
comment	@# @;


1.11
date	96.03.10.18.52.32;	author wosch;	state dead;
branches;
next	1.10;

1.10
date	95.10.21.14.27.19;	author bde;	state Exp;
branches;
next	1.9;

1.9
date	95.07.25.00.33.21;	author bde;	state Exp;
branches;
next	1.8;

1.8
date	94.08.28.18.33.48;	author bde;	state Exp;
branches;
next	1.7;

1.7
date	94.06.05.21.57.16;	author csgr;	state Exp;
branches;
next	1.6;

1.6
date	94.06.05.20.39.58;	author csgr;	state Exp;
branches;
next	1.5;

1.5
date	93.07.23.08.23.19;	author nate;	state Exp;
branches;
next	1.4;

1.4
date	93.07.23.02.58.20;	author jkh;	state Exp;
branches;
next	1.3;

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

1.2
date	93.07.17.06.20.35;	author rgrimes;	state Exp;
branches;
next	1.1;

1.1
date	93.07.07.23.07.00;	author jkh;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	93.07.07.23.07.01;	author jkh;	state Exp;
branches;
next	;


desc
@@


1.11
log
@share the code between apropos and whatis
@
text
@# $Id: Makefile,v 1.10 1995/10/21 14:27:19 bde Exp wosch $

SHPROG=	whatis

.include "../../Makefile.inc"
.include "../Makefile.shprog"
@


1.10
log
@Rewrite and merge some bogus makefiles to create Makefile.shprog.  Just
include this in the old makefiles.

I intended to fix only the private maninstall rule but found a lot of
other bogons and bugs:
- strong resistance to installing the program anywhere other than
  ${DESTDIR}/usr/bin (first, ../../Makefile.inc was not included.
  ../Makefile/inc was redundantly included instead.  Second, /usr/bin
  was hard coded).
- the owner, group and permissions were hard coded.
- the man page was installed twice.
- MANDEPEND wasn't necessary.
- calculations to determine the obj directory weren't necessary.
- there were unnecessary private rules for depend, rcsfreeze and tags.
  We don't support the rcsfreeze target.
- there was an extra, bogus, rule for `all'.

The final version uses suffix rules to eliminate the remaining verboseness
involving directories (${.CURDIR}) and to potentially allow multiple
shell programs in one directory.
@
text
@d1 1
a1 1
# $Id$
@


1.9
log
@Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
@
text
@d1 1
a1 7
.if exists(${.CURDIR}/obj)
MAN1=  ${.CURDIR}/obj/whatis.1
TARG=  ${.CURDIR}/obj/whatis
.else
MAN1=  ${.CURDIR}/whatis.1
TARG=  ${.CURDIR}/whatis
.endif
d3 1
a3 1
MANDEPEND=	${MAN1}
d5 2
a6 31
CLEANFILES+=	${TARG} ${MAN1}

all:	${TARG} ${MAN1}

depend rcsfreeze tags all:
	@@echo -n

${TARG}: ${.CURDIR}/whatis.sh
	sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \
	    -e 's,%pager%,${pager},' \
		${.CURDIR}/whatis.sh > ${.TARGET}

${MAN1}: ${.CURDIR}/whatis.man
	sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \
	    -e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \
	    -e 's,%manpath_config_file%,${manpath_config_file},' \
		${.CURDIR}/whatis.man > ${.TARGET}

install: ${TARG} maninstall
	${INSTALL} -c -o bin -g bin -m 555 ${TARG} ${DESTDIR}/usr/bin

.include "../Makefile.inc"
.if make(maninstall) || make(install)
.if !defined(NOMAN)
.include <bsd.man.mk>
.else
maninstall:
.endif
.endif

.include <bsd.prog.mk>
@


1.8
log
@Use standard clean, cleandir and obj targets.

Don't use $@@.

Uniformize the man Makefiles for shell scripts.  It should't take such
large Makefiles to install one script and one man page each.
@
text
@d30 1
a30 1
	install -c -o bin -g bin -m 555 ${TARG} ${DESTDIR}/usr/bin
@


1.7
log
@Make these Makefiles work properly when NOMAN is defined.
(I wish they just used bsd.prog.mk)
@
text
@d11 2
a17 6
cleandir: clean
	cd ${.CURDIR}; rm -rf obj;

clean:
	@@rm -f ${TARG} ${MAN1}

d21 1
a21 1
		${.CURDIR}/whatis.sh > ${TARG}
d27 1
a27 1
	${.CURDIR}/whatis.man > ${MAN1}
a31 1

d40 2
@


1.6
log
@Manual pages are now installed via the bsd.man.mk macro, since the
existing arrangement in this makefile doesn't allow for compressed
manual pages.
@
text
@d39 1
d41 3
@


1.5
log
@Added ${DESTDIR} to all the naked install commands w/out them.
@
text
@d2 1
a2 1
MANP=  ${.CURDIR}/obj/whatis.1
d5 1
a5 1
MANP=  ${.CURDIR}/whatis.1
d9 3
a11 1
all:	${TARG} ${MANP}
d20 1
a20 1
	@@rm -f ${TARG} ${MANP}
d27 1
a27 1
${MANP}: ${.CURDIR}/whatis.man
d31 1
a31 1
	${.CURDIR}/whatis.man > ${MANP}
a35 2
maninstall: ${MANP}
	install -c -o bin -g bin -m 444 ${MANP} ${DESTDIR}/usr/share/man/man1
d38 3
@


1.4
log
@Changes to make `maninstall' work.
@
text
@d32 1
a32 1
	install -c -o bin -g bin -m 555 ${TARG} /usr/bin
d35 1
a35 1
	install -c -o bin -g bin -m 444 ${MANP} /usr/share/man/man1
@


1.3
log
@Changes to allow man to work with or without obj dirs.
@
text
@d31 1
a31 1
install: ${TARG} ${MANP}
d33 2
@


1.2
log
@Fixed make file for tags target, removed files that are generated by the
Makefile.
@
text
@d1 7
a7 1
.include "../Makefile.inc"
d9 1
a9 1
all:	whatis whatis.1
d11 1
a11 1
obj depend rcsfreeze tags all:
d15 1
d18 1
a18 1
	@@rm -f whatis whatis.1
d20 1
a20 1
whatis: whatis.sh
d23 1
a23 1
		whatis.sh > whatis
d25 1
a25 1
whatis.1: whatis.man
d29 5
a33 1
	whatis.man > whatis.1
d35 1
a35 3
install: whatis whatis.1
	install -c -o bin -g bin -m 555 whatis /usr/bin
	install -c -o bin -g bin -m 444 whatis.1 /usr/share/man/man1
@


1.1
log
@Initial revision
@
text
@d5 1
a5 1
obj depend rcsfreeze all:
@


1.1.1.1
log
@Newer new man page reader.
@
text
@@
