freebsd-ports/devel/tcl-memchan/files/Makefile.bsd
Mikhail Teterin a5a2364bca Another case of SHLIBDIR->LIBDIR. While here, upgrade from 2.2a2 to 2.2a4
(released in August 2002). Stop parametrizing some of the values in
files/Makefile.bsd -- they change _so rarely_ the benefit does not justify
the gymnastics. Default to TCL-8.3

Suggested by:	kris
2003-10-27 21:03:04 +00:00

44 lines
1.1 KiB
Text

LIBNAME= Memchan
SHLIB_NAME= lib${LIBNAME}.so.2
.PATH: ${.CURDIR}/generic
SRCS= memchan.c init.c counter.c fifo.c fifo2.c null.c buf.c \
bufFix.c bufExt.c bufRange.c bufQueue.c bufStubInit.c \
bufStubLib.c
TCL_VER?= 8.3
LOCALBASE?= /usr/local
CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER} \
-DMEMCHAN_VERSION='"${SHLIB_MAJOR}.${SHLIB_MINOR}"'
LDADD= -L${LOCALBASE}/lib -ltcl${TCL_VER:S/.//}
all: pkgIndex.tcl test
pkgIndex.tcl:
echo 'package ifneeded ${LIBNAME} 2.2 \
[list load [file join $$dir $(SHLIB_NAME)]]' > pkgIndex.tcl
DIR = lib/tcl${TCL_VER}/${LIBNAME}
LIBDIR = ${PREFIX}/${DIR}
MANDIR = ${PREFIX}/man/man
${LIBDIR}:
${MKDIR} ${LIBDIR}
env:
@${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR}
beforeinstall: ${LIBDIR} pkgIndex.tcl
${INSTALL_DATA} pkgIndex.tcl ${LIBDIR}/pkgIndex.tcl
.include <bsd.lib.mk>
test: ${SHLIB_NAME} pkgIndex.tcl
echo ' set auto_path ${.OBJDIR}; cd ${.CURDIR}/tests; \
package require ${LIBNAME}; \
if {[catch {source all} msg]} { \
puts stderr $msg; exit -1 \
}' | ${LOCALBASE}/bin/tclsh${TCL_VER}