summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoretheisen <etheisen@cvs.openbsd.org>1996-09-21 05:55:36 +0000
committeretheisen <etheisen@cvs.openbsd.org>1996-09-21 05:55:36 +0000
commit5b2dc2545f95d91daf78365b3c049b1e3f8aa819 (patch)
tree2fe198e7d32cab9b165bfcf61f3ad5d853228939
parent47d3895c0565680e9e7eba725be0896bfd06ce11 (diff)
Build less-290 using wrappers.
-rw-r--r--usr.bin/less/Makefile.bsd-wrapper78
-rw-r--r--usr.bin/less/Makefile.in15
2 files changed, 90 insertions, 3 deletions
diff --git a/usr.bin/less/Makefile.bsd-wrapper b/usr.bin/less/Makefile.bsd-wrapper
new file mode 100644
index 00000000000..9127d119845
--- /dev/null
+++ b/usr.bin/less/Makefile.bsd-wrapper
@@ -0,0 +1,78 @@
+# $OpenBSD: Makefile.bsd-wrapper,v 1.1 1996/09/21 05:55:35 etheisen Exp $
+
+LINKS= ${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page
+
+#
+# less config
+#
+PREFIX= /usr
+DATADIR= $(PREFIX)/share/misc
+MAN= less.1 lesskey.1
+MLINKS= less.1 more.1 less.1 page.1
+CLEANFILES= config.cache config.log $(MAN)
+
+#
+# Wrapped flags
+#
+WCFLAGS= CFLAGS="$(CFLAGS)"
+WLDFLAGS= LDFLAGS="$(LDSTATIC)"
+
+all: config.status gnu_build
+
+.FORCE: .IGNORE
+
+config: .FORCE
+ -rm -f config.cache
+ /bin/sh $(.CURDIR)/configure --prefix=$(PREFIX)
+
+config.status:
+ /bin/sh $(.CURDIR)/configure --prefix=$(PREFIX)
+
+gnu_build:
+ $(MAKE) $(WCFLAGS) $(WLDFLAGS) datadir=$(DATADIR)
+
+install: gnu_install maninstall _SUBDIRUSE
+.if defined(LINKS) && !empty(LINKS)
+ @set ${LINKS}; \
+ while test $$# -ge 2; do \
+ l=${DESTDIR}$$1; \
+ shift; \
+ t=${DESTDIR}$$1; \
+ shift; \
+ echo $$t -\> $$l; \
+ rm -f $$t; \
+ ln $$l $$t; \
+ done; true
+.endif
+
+gnu_install:
+ $(MAKE) $(WCFLAGS) $(WLDFLAGS) datadir=$(DATADIR) \
+ INSTALL_PROGRAM="install $(COPY) $(STRIP) -o $(BINOWN) -g $(BINGRP) -m $(BINMODE)" \
+ INSTALL_DATA="install $(COPY) -o ${BINOWN} -g ${BINGRP} -m 444" \
+ INSTALL_MAN= INSTALLDIRS= install
+
+clean cleandir:
+ rm -f $(CLEANFILES)
+ -@if [ -e Makefile ]; then $(MAKE) distclean; fi
+
+#
+# Fix less manpage suffix
+#
+.SUFFIXES: .nro .1 .2 .3 .4 .5 .6 .7 .8 .9
+
+.nro.1 .nro.2 .nro.3 .nro.4 .nro.5 .nro.6 .nro.7 .nro.8 .nro.9:
+ -@ln -sf $(.IMPSRC) $(.TARGET)
+
+depend:
+ # Nothing here so far...
+
+lint:
+ # Nothing here so far...
+
+tags:
+ # Nothing here so far...
+
+.include <../Makefile.inc>
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
+.include <bsd.man.mk>
diff --git a/usr.bin/less/Makefile.in b/usr.bin/less/Makefile.in
index 9c15e7858dc..f43a303d975 100644
--- a/usr.bin/less/Makefile.in
+++ b/usr.bin/less/Makefile.in
@@ -10,6 +10,13 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+#
+# XXX - OpenBSD modificatations
+#
+INSTALL_MAN=install_man
+MANPAGES=less.nro lesskey.nro
+INSTALLDIRS=installdirs
+
CFLAGS = @CFLAGS@
CFLAGS_COMPILE_ONLY = -c
LDFLAGS = @LDFLAGS@
@@ -74,16 +81,18 @@ ${OBJ}: less.h defines.h funcs.h
filename.${O}: filename.c
${CC} -c -DHELPFILE=\"${datadir}/less.hlp\" -I. ${CPPFLAGS} ${CFLAGS} ${srcdir}/filename.c
-install: all less.hlp less.nro installdirs
+install: all less.hlp $(INSTALL_MAN) $(INSTALLDIRS)
${INSTALL_PROGRAM} less ${bindir}/${binprefix}less
${INSTALL_PROGRAM} lesskey ${bindir}/${binprefix}lesskey
${INSTALL_DATA} ${srcdir}/less.hlp ${datadir}/less.hlp
- ${INSTALL_DATA} ${srcdir}/less.nro ${mandir}/${manprefix}less.${manext}
- ${INSTALL_DATA} ${srcdir}/lesskey.nro ${mandir}/${manprefix}lesskey.${manext}
installdirs: mkinstalldirs
${srcdir}/mkinstalldirs ${bindir} ${datadir} ${mandir}
+install_man: ${MANPAGES}
+ ${INSTALL_DATA} ${srcdir}/less.nro ${mandir}/${manprefix}less.${manext}
+ ${INSTALL_DATA} ${srcdir}/lesskey.nro ${mandir}/${manprefix}lesskey.${manext}
+
uninstall:
rm -f ${bindir}/${binprefix}less ${bindir}/${binprefix}lesskey
rm -f ${datadir}/less.hlp