From 0d081000a58c18c9c1029112a3e67175777cda52 Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Mon, 28 Jan 2002 16:28:04 +0000 Subject: Actually add the Makefile.bsd... Damn... Submitted by: fenner --- devel/tcl-memchan/files/Makefile.bsd | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 devel/tcl-memchan/files/Makefile.bsd (limited to 'devel/tcl-memchan') diff --git a/devel/tcl-memchan/files/Makefile.bsd b/devel/tcl-memchan/files/Makefile.bsd new file mode 100644 index 000000000000..e5435a0ca9c4 --- /dev/null +++ b/devel/tcl-memchan/files/Makefile.bsd @@ -0,0 +1,49 @@ +LIB= Memchan +SHLIB_MAJOR= 2 +SHLIB_MINOR= 2 + +.PATH: ${.CURDIR}/generic + +.if exists(${.CURDIR}/Makefile.in) +_SRCS!= ${MAKE} -f ${.CURDIR}/Makefile.in -V Memchan_SOURCES +SRCS= ${_SRCS:S/@srcdir@\/generic\///} +.endif + +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/.//} + +INTERNALLIB = don't build the useless static version +NOPROFILE = don't care for profiling + +all: ${SHLIB_NAME} pkgIndex.tcl test + +pkgIndex.tcl: + echo 'package ifneeded ${LIB} ${SHLIB_MAJOR}.${SHLIB_MINOR} \ + [list load [file join $$dir $(SHLIB_NAME)]]' > pkgIndex.tcl + +DIR = lib/tcl${TCL_VER}/${LIB} +SHLIBDIR = ${PREFIX}/${DIR} +MANDIR = ${PREFIX}/man/man + +${SHLIBDIR}: + ${MKDIR} ${SHLIBDIR} + +env: + @${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR} + +beforeinstall: ${SHLIBDIR} pkgIndex.tcl + ${INSTALL_DATA} pkgIndex.tcl ${SHLIBDIR}/pkgIndex.tcl + +.include + +test: ${SHLIB_NAME} pkgIndex.tcl + echo ' set auto_path ${.OBJDIR}; cd ${.CURDIR}/tests; \ + package require ${LIB} ${SHLIB_MAJOR}.${SHLIB_MINOR}; \ + if {[catch {source all} msg]} { \ + puts stderr $msg; exit -1 \ + }' | ${LOCALBASE}/bin/tclsh${TCL_VER} -- cgit v1.2.3