summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/man
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1993-07-21 17:18:04 +0000
committerjkh <jkh@FreeBSD.org>1993-07-21 17:18:04 +0000
commitee78129063eab8399fd4e5e3e03235da3e5045a9 (patch)
treee8b4f9159842648036778c0621df0225af325c88 /gnu/usr.bin/man
parent12b53687ad0c0e22cb713896c56e184ea75dd71e (diff)
downloadFreeBSD-src-ee78129063eab8399fd4e5e3e03235da3e5045a9.zip
FreeBSD-src-ee78129063eab8399fd4e5e3e03235da3e5045a9.tar.gz
Changes to allow man to work with or without obj dirs.
Diffstat (limited to 'gnu/usr.bin/man')
-rw-r--r--gnu/usr.bin/man/Makefile.inc13
-rw-r--r--gnu/usr.bin/man/apropos/Makefile31
-rw-r--r--gnu/usr.bin/man/lib/Makefile15
-rw-r--r--gnu/usr.bin/man/makewhatis/Makefile21
-rw-r--r--gnu/usr.bin/man/man/Makefile14
-rw-r--r--gnu/usr.bin/man/manpath/Makefile12
-rw-r--r--gnu/usr.bin/man/whatis/Makefile31
7 files changed, 98 insertions, 39 deletions
diff --git a/gnu/usr.bin/man/Makefile.inc b/gnu/usr.bin/man/Makefile.inc
index 4616338..b8bb2d1 100644
--- a/gnu/usr.bin/man/Makefile.inc
+++ b/gnu/usr.bin/man/Makefile.inc
@@ -19,3 +19,16 @@ refer= /usr/bin/refer
grap= # no grap
pic= /usr/bin/pic
zcat= /usr/bin/zcat
+
+# For scripts.
+.if !target(obj)
+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; \
+ else \
+ true; \
+ fi;
+.endif
diff --git a/gnu/usr.bin/man/apropos/Makefile b/gnu/usr.bin/man/apropos/Makefile
index e249f19..8073f99 100644
--- a/gnu/usr.bin/man/apropos/Makefile
+++ b/gnu/usr.bin/man/apropos/Makefile
@@ -1,26 +1,35 @@
-.include "../Makefile.inc"
+.if exists(${.CURDIR}/obj)
+MANP= ${.CURDIR}/obj/apropos.1
+TARG= ${.CURDIR}/obj/apropos
+.else
+MANP= ${.CURDIR}/apropos.1
+TARG= ${.CURDIR}/apropos
+.endif
-all: apropos apropos.1
+all: ${TARG} ${MANP}
-obj depend rcsfreeze tags all:
+depend rcsfreeze tags all:
@echo -n
cleandir: clean
+ cd ${.CURDIR}; rm -rf obj;
clean:
- @rm -f apropos apropos.1
+ @rm -f ${TARG} ${MANP}
-apropos: apropos.sh
+${TARG}: ${.CURDIR}/apropos.sh
sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \
-e 's,%pager%,${pager},' \
- apropos.sh > apropos
+ ${.CURDIR}/apropos.sh > $@
-apropos.1: apropos.man
+${MANP}: ${.CURDIR}/apropos.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},' \
- apropos.man > apropos.1
+ ${.CURDIR}/apropos.man > $@
+
+install: ${TARG} ${MANP}
+ install -c -o bin -g bin -m 555 ${TARG} /usr/bin
+ install -c -o bin -g bin -m 444 ${MANP} /usr/share/man/man1
-install: apropos apropos.1
- install -c -o bin -g bin -m 555 apropos /usr/bin
- install -c -o bin -g bin -m 444 apropos.1 /usr/share/man/man1
+.include "../Makefile.inc"
diff --git a/gnu/usr.bin/man/lib/Makefile b/gnu/usr.bin/man/lib/Makefile
index 0990549..d364b32 100644
--- a/gnu/usr.bin/man/lib/Makefile
+++ b/gnu/usr.bin/man/lib/Makefile
@@ -1,15 +1,22 @@
LIB = man
+.if exists(${.CURDIR}/obj)
+CONFH= ${.CURDIR}/obj/config.h
+.else
+CONFH= ${.CURDIR}/config.h
+.endif
+
+
CFLAGS+= -I${.CURDIR} -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS -DALT_SYSTEMS
-CLEANFILES+= ${.CURDIR}/config.h
+CLEANFILES+= ${CONFH}
SRCS = util.c gripes.c
-libman.a:: ${.CURDIR}/config.h
+libman.a:: ${CONFH}
install:
@echo -n
-depend ${.CURDIR}/config.h: ${.CURDIR}/config.h_dist ../Makefile.inc
+depend ${CONFH}: ${.CURDIR}/config.h_dist ../Makefile.inc
sed -e 's,%apropos%,${apropos},' -e 's,%whatis%,${whatis},' \
-e 's,%pager%,${pager},' -e 's,%troff%,${troff},' \
-e 's,%nroff%,${nroff},' -e 's,%tbl%,${tbl},' \
@@ -18,6 +25,6 @@ depend ${.CURDIR}/config.h: ${.CURDIR}/config.h_dist ../Makefile.inc
-e 's,%vgrind%,${vgrind},' -e 's,%refer%,${refer},' \
-e 's,%grap%,${grap},' -e 's,%zcat%,${zcat},' \
-e 's,%manpath_config_file%,${manpath_config_file},' \
- ${.CURDIR}/config.h_dist > ${.CURDIR}/config.h
+ ${.CURDIR}/config.h_dist > ${CONFH}
.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/man/makewhatis/Makefile b/gnu/usr.bin/man/makewhatis/Makefile
index 0e70dcf..8dc9c0b 100644
--- a/gnu/usr.bin/man/makewhatis/Makefile
+++ b/gnu/usr.bin/man/makewhatis/Makefile
@@ -1,17 +1,24 @@
-.include "../Makefile.inc"
+.if exists(${.CURDIR}/obj)
+TARG= ${.CURDIR}/obj/makewhatis
+.else
+TARG= ${.CURDIR}/makewhatis
+.endif
-all: makewhatis
+all: ${TARG}
-obj depend rcsfreeze tags all:
+depend rcsfreeze tags all:
@echo -n
cleandir: clean
+ cd ${.CURDIR}; rm -rf obj;
clean:
- @rm -f makewhatis
+ @rm -f ${TARG}
install:
- install -c -o bin -g bin -m 444 makewhatis /usr/bin
+ install -c -o bin -g bin -m 444 ${TARG} /usr/bin
+
+${TARG}: ${.CURDIR}/makewhatis.sh
+ sed -e 's/%sections%/ "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "p", "o", NULL/' ${.CURDIR}/makewhatis.sh > ${TARG}
-makewhatis: makewhatis.sh
- sed -e 's/%sections%/ "1", "n", "l", "6", "8", "2", "3", "4", "5", "7", "p", "o", NULL/' makewhatis.sh > makewhatis
+.include "../Makefile.inc"
diff --git a/gnu/usr.bin/man/man/Makefile b/gnu/usr.bin/man/man/Makefile
index 3971577..0525723 100644
--- a/gnu/usr.bin/man/man/Makefile
+++ b/gnu/usr.bin/man/man/Makefile
@@ -1,20 +1,28 @@
PROG= man
SRCS= man.c manpath.c glob.c
-MAN1= man.1
BINMODE=2555
.if exists(${.CURDIR}/../lib/obj)
LDADD= -L${.CURDIR}/../lib/obj -lman
+CFLAGS+= -I${.CURDIR}/../lib/obj
.else
LDADD= -L${.CURDIR}/../lib/ -lman
.endif
+.if exists(${.CURDIR}/obj)
+MAN1= ${.CURDIR}/obj/man.1
+.else
+MAN1= ${.CURDIR}/man.1
+.endif
+
+DPADD+= ${MAN1}
CFLAGS+= -I${.CURDIR}/../lib -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS -DALT_SYSTEMS
+CLEANFILES+= ${MAN1}
-man.1: man.man
+${MAN1}: ${.CURDIR}/man.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},' \
- man.man > man.1
+ ${.CURDIR}/man.man > ${MAN1}
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/man/manpath/Makefile b/gnu/usr.bin/man/manpath/Makefile
index d8eb66d..49d487d 100644
--- a/gnu/usr.bin/man/manpath/Makefile
+++ b/gnu/usr.bin/man/manpath/Makefile
@@ -1,5 +1,4 @@
PROG= manpath
-MAN1= manpath.1
SRCS= manpath.c
.if exists(${.CURDIR}/../lib/obj)
@@ -8,13 +7,20 @@ LDADD= -L${.CURDIR}/../lib/obj -lman
LDADD= -L${.CURDIR}/../lib/ -lman
.endif
+.if exists(${.CURDIR}/obj)
+MAN1=${.CURDIR}/obj/manpath.1
+.else
+MAN1=${.CURDIR}/manpath.1
+.endif
+
+DPADD+= ${MAN1}
CFLAGS+= -I${.CURDIR}/../lib -DMAIN -DSTDC_HEADERS -DPOSIX -DHAS_TROFF -DDO_UNCOMPRESS -DALT_SYSTEMS
-manpath.1: manpath.man
+${MAN1}: ${.CURDIR}/manpath.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},' \
- manpath.man > manpath.1
+ ${.CURDIR}/manpath.man > ${MAN1}
afterinstall:
install -c -o bin -g bin -m 555 ${.CURDIR}/manpath.config ${DESTDIR}${manpath_config_file}
diff --git a/gnu/usr.bin/man/whatis/Makefile b/gnu/usr.bin/man/whatis/Makefile
index 5ba2781..ebafe035 100644
--- a/gnu/usr.bin/man/whatis/Makefile
+++ b/gnu/usr.bin/man/whatis/Makefile
@@ -1,26 +1,35 @@
-.include "../Makefile.inc"
+.if exists(${.CURDIR}/obj)
+MANP= ${.CURDIR}/obj/whatis.1
+TARG= ${.CURDIR}/obj/whatis
+.else
+MANP= ${.CURDIR}/whatis.1
+TARG= ${.CURDIR}/whatis
+.endif
-all: whatis whatis.1
+all: ${TARG} ${MANP}
-obj depend rcsfreeze tags all:
+depend rcsfreeze tags all:
@echo -n
cleandir: clean
+ cd ${.CURDIR}; rm -rf obj;
clean:
- @rm -f whatis whatis.1
+ @rm -f ${TARG} ${MANP}
-whatis: whatis.sh
+${TARG}: ${.CURDIR}/whatis.sh
sed -e 's,%libdir%,${libdir},' -e 's,%bindir%,${bindir},' \
-e 's,%pager%,${pager},' \
- whatis.sh > whatis
+ ${.CURDIR}/whatis.sh > ${TARG}
-whatis.1: whatis.man
+${MANP}: ${.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},' \
- whatis.man > whatis.1
+ ${.CURDIR}/whatis.man > ${MANP}
+
+install: ${TARG} ${MANP}
+ install -c -o bin -g bin -m 555 ${TARG} /usr/bin
+ install -c -o bin -g bin -m 444 ${MANP} /usr/share/man/man1
-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
+.include "../Makefile.inc"
OpenPOWER on IntegriCloud