$NetBSD: patch-aa,v 1.4 2006/05/17 04:29:00 minskim Exp $ --- Makefile.orig 1998-08-25 07:25:20.000000000 +0000 +++ Makefile @@ -18,12 +18,12 @@ TCLEXPAT_VERSION = 1.1 TCL_SHLIB_SUFFIX = .so TCL_OBJS = tclexpat.o -TCL_PREFIX = /usr/local/tcl/8.0 -TCL_EXEC_PREFIX = /usr/local/tcl/8.0 -TCL_SHLIB_CFLAGS = -fPIC -TCL_SHLIB_LD = gcc -shared -TCL_CC = gcc -TCL_PACKAGE_PATH = /usr/local/tcl/8.0/lib +TCL_PREFIX = ${LOCALBASE} +TCL_EXEC_PREFIX = ${LOCALBASE} +TCL_SHLIB_CFLAGS = +TCL_SHLIB_LD = ${SHLIBTOOL} --mode=link ${CC} +TCL_CC = ${SHLIBTOOL} --mode=compile ${CC} +TCL_PACKAGE_PATH = ${PREFIX}/lib/tcl @@ -64,39 +64,27 @@ FILEMAP_OBJ=expat/xmlwf/unixfilemap.o # You shouldnt have to edit anything below here #---------------------------------------------------------------------------- -CC= $(TCL_CC) LIB= tclexpat$(TCL_SHLIB_SUFFIX) -OBJS=expat/xmltok/xmltok.o \ - expat/xmltok/xmlrole.o \ - expat/xmlwf/xmlwf.o \ - expat/xmlwf/codepage.o \ - expat/xmlparse/xmlparse.o \ - expat/xmlparse/hashtable.o \ - $(FILEMAP_OBJ) - +OBJS= all: $(LIB) - -$(LIB): tclexpat.o ${OBJS} - $(TCL_SHLIB_LD) -o $(LIB) $(OBJS) tclexpat.o - -${OBJS}: - cd expat ; make CC=${CC} SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS} +$(LIB): tclexpat.o + $(TCL_SHLIB_LD) -o ${LIB:.so=.la} ${OBJS:.o=.lo} tclexpat.lo -L${LOCALBASE}/lib -rpath ${PREFIX}/lib -lexpat -ltcl84 -module -avoid-version tclexpat.o: tclexpat.c - $(TCL_CC) $(CFLAGS) -c $(TCL_DEFS) $(TCL_SHLIB_CFLAGS) -I$(TCL_PREFIX)/include -Iexpat/xmlparse tclexpat.c + $(TCL_CC) $(CFLAGS) -c $(TCL_DEFS) $(TCL_SHLIB_CFLAGS) -I$(TCL_PREFIX)/include tclexpat.c install: $(LIB) instdir=`echo $(TCL_PACKAGE_PATH) | cut -f 1 -d :` ; \ - mkdir $$instdir/TclExpat-$(TCLEXPAT_VERSION) ; \ - cp $(LIB) pkgIndex.tcl $$instdir - + ${BSD_INSTALL_DATA_DIR} $$instdir/TclExpat-$(TCLEXPAT_VERSION) ; \ + ${SHLIBTOOL} --mode=install ${BSD_INSTALL_LIB} ${LIB:.so=.la} $$instdir/TclExpat-${TCLEXPAT_VERSION}; \ + ${SHLIBTOOL} --mode=finish $$instdir/TclExpat-${TCLEXPAT_VERSION}; \ + ${BSD_INSTALL_DATA} pkgIndex.tcl $$instdir/TclExpat-${TCLEXPAT_VERSION} clean: - @cd expat; make clean rm -f *~ *.o @if [ ! -z $(TCL_SHLIB_SUFFIX) ] ; then \ echo "rm -f *$(TCL_SHLIB_SUFFIX)" ;\