[BACK]Return to Makefile.bsd-wrapper CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

File: [local] / src / usr.bin / less / Attic / Makefile.bsd-wrapper (download)

Revision 1.12, Tue Jul 29 03:16:29 1997 UTC (26 years, 10 months ago) by kstailey
Branch: MAIN
Changes since 1.11: +12 -1 lines

Start of GLOBAL_CACHE option to speed compiles.
This change should have no effect by default.
"setenv GLOBAL_CACHE" or add GLOBAL_CACHE to /etc/mk.conf to activate.
Global cache files are on a per-account basis to deal with security.

#	$OpenBSD: Makefile.bsd-wrapper,v 1.12 1997/07/29 03:16:29 kstailey Exp $

#
# less config
#
PREFIX=		/usr
BINDIR=		${PREFIX}/bin
DATADIR=	${PREFIX}/share/misc
LESS_HLP=	more.help
LIBS=		-ltermcap
LINKS=		${BINDIR}/less ${BINDIR}/more ${BINDIR}/less ${BINDIR}/page
MAN=		less.1 lesskey.1
MLINKS=		less.1 more.1 less.1 page.1
CLEANFILES=	config.cache config.log $(MAN)

#
# Wrapped flags
#
WCC=		CC="${CC}"
WCFLAGS=	CFLAGS="${CFLAGS}"
WLDFLAGS=	LDFLAGS="${LDSTATIC}"

all: config.status gnu_build

#
# XXX - This is needed because crunchgen wasn't 
#       designed to work with wrappers.  The
#	default sys.mk SUFFIX rules were being
#	invoked accidentally and crunchgen
#	couldn't figure out what objects were
#	needed.
#
OBJS=	main.o screen.o brac.o ch.o charset.o cmdbuf.o \
	command.o decode.o edit.o filename.o forwback.o \
	help.o ifile.o input.o jump.o line.o linenum.o \
	lsystem.o mark.o optfunc.o option.o opttbl.o os.o \
	output.o position.o prompt.o search.o signal.o \
	tags.o ttyin.o version.o
.SUFFIXES: .o .c
.c.o: config.status
	@$(MAKE) ${WCC} ${WCFLAGS} ${WLDFLAGS} LIBS=${LIBS} \
		 datadir=${DATADIR} LESS_HLP=${LESS_HLP} ${.TARGET}

.FORCE: .IGNORE

.ifdef GLOBAL_CACHE
config: .FORCE
	/bin/sh ${.CURDIR}/configure --prefix=${PREFIX} \
		--cache-file=${HOME}/.Makefile.bsd-wrapper.cache

config.status:
	/bin/sh ${.CURDIR}/configure --prefix=${PREFIX} \
		--cache-file=${HOME}/.Makefile.bsd-wrapper.cache
.else
config: .FORCE
	-rm -f config.cache
	/bin/sh ${.CURDIR}/configure --prefix=${PREFIX}

config.status:
	/bin/sh ${.CURDIR}/configure --prefix=${PREFIX}
.endif


gnu_build:
	${MAKE} ${WCC} ${WCFLAGS} ${WLDFLAGS} LIBS=${LIBS} datadir=${DATADIR} \
		LESS_HLP=${LESS_HLP}

.ifdef NOMAN
maninstall:
	@echo NOMAN is set
.endif

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} ${WCC} ${WCFLAGS} ${WLDFLAGS} LIBS=${LIBS} \
		LESS_HLP=${LESS_HLP} bindir=${DESTDIR}${BINDIR} \
		datadir=${DESTDIR}${PREFIX}/share/misc \
		INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}" \
		INSTALL_DATA="${INSTALL} ${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 <bsd.obj.mk>
.include <bsd.subdir.mk>
.if !defined(NOMAN)
.include <bsd.man.mk>
.endif