Annotation of src/usr.bin/less/Makefile.bsd-wrapper, Revision 1.23
1.23 ! espie 1: # $OpenBSD: Makefile.bsd-wrapper,v 1.22 2006/10/14 20:20:51 drahn Exp $
1.1 etheisen 2:
3: #
4: # less config
5: #
6: PREFIX= /usr
1.8 niklas 7: BINDIR= ${PREFIX}/bin
8: DATADIR= ${PREFIX}/share/misc
1.17 millert 9: LIBS= -lcurses
1.20 millert 10: LESS_HLP= more.help
1.5 etheisen 11: LINKS= ${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page
1.1 etheisen 12: MAN= less.1 lesskey.1
13: MLINKS= less.1 more.1 less.1 page.1
1.21 millert 14: CLEANFILES= config.cache config.log
1.4 etheisen 15:
16: #
1.5 etheisen 17: # Wrapped flags
18: #
1.19 millert 19: XCFLAGS= CC="${CC}" CFLAGS="${CFLAGS} ${COPTS}" LDFLAGS="${LDFLAGS} ${LDSTATIC}"
1.5 etheisen 20:
21: all: config.status gnu_build
22:
1.1 etheisen 23: .FORCE: .IGNORE
24:
1.16 kstailey 25: .include <bsd.own.mk>
26:
1.13 kstailey 27: .ifdef GLOBAL_AUTOCONF_CACHE
1.14 kstailey 28: CF= --cache-file=${GLOBAL_AUTOCONF_CACHE}
29: .else
1.19 millert 30: CF= --cache-file=config.cache
1.22 drahn 31: .endif
32:
33: HOST_ARCH!=arch -s
34: .if (${MACHINE_ARCH} != ${HOST_ARCH})
35: CF+= --target=openbsd-${MACHINE_ARCH} --host=${HOST_ARCH}
1.14 kstailey 36: .endif
1.12 kstailey 37:
1.1 etheisen 38: config: .FORCE
1.14 kstailey 39: .ifndef GLOBAL_AUTOCONF_CACHE
1.15 kstailey 40: -rm -f config.cache
1.14 kstailey 41: .endif
1.19 millert 42: ${XCFLAGS} PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
1.20 millert 43: INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
1.19 millert 44: TERMLIBS=-lcurses /bin/sh ${.CURDIR}/configure \
45: --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc ${CF}
1.1 etheisen 46:
47: config.status:
1.19 millert 48: ${XCFLAGS} PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
1.20 millert 49: INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
1.19 millert 50: TERMLIBS=-lcurses /bin/sh ${.CURDIR}/configure \
51: --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc ${CF}
1.1 etheisen 52:
1.23 ! espie 53: gnu_build: config.status
1.20 millert 54: ${MAKE} ${XCFLAGS} LIBS=${LIBS} datadir=${DATADIR} LESS_HLP=${LESS_HLP}
1.11 kstailey 55:
56: .ifdef NOMAN
57: maninstall:
58: @echo NOMAN is set
59: .endif
1.1 etheisen 60:
1.20 millert 61: install: gnu_install maninstall afterinstall _SUBDIRUSE
1.1 etheisen 62: .if defined(LINKS) && !empty(LINKS)
63: @set ${LINKS}; \
64: while test $$# -ge 2; do \
65: l=${DESTDIR}$$1; \
66: shift; \
67: t=${DESTDIR}$$1; \
68: shift; \
69: echo $$t -\> $$l; \
70: rm -f $$t; \
71: ln $$l $$t; \
72: done; true
73: .endif
74:
75: gnu_install:
1.19 millert 76: ${MAKE} ${XCFLAGS} LIBS=${LIBS} \
1.20 millert 77: LESS_HLP=${LESS_HLP} bindir=${DESTDIR}${BINDIR} \
1.8 niklas 78: datadir=${DESTDIR}${PREFIX}/share/misc \
1.9 millert 79: INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}" \
80: INSTALL_DATA="${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444" \
1.1 etheisen 81: INSTALL_MAN= INSTALLDIRS= install
82:
83: clean cleandir:
1.8 niklas 84: rm -f ${CLEANFILES}
85: -@if [ -e Makefile ]; then ${MAKE} distclean; fi
1.20 millert 86:
87: afterinstall:
88: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE} \
89: ${.CURDIR}/less.hlp ${DESTDIR}${DATADIR}/${LESS_HLP}
1.1 etheisen 90:
91: depend:
92: # Nothing here so far...
93:
94: lint:
95: # Nothing here so far...
96:
97: tags:
98: # Nothing here so far...
99:
100: .include <bsd.obj.mk>
101: .include <bsd.subdir.mk>
1.10 kstailey 102: .if !defined(NOMAN)
1.1 etheisen 103: .include <bsd.man.mk>
1.10 kstailey 104: .endif