$NetBSD: patch-aa,v 1.3 2004/03/09 01:16:59 minskim Exp $ --- Makefile.orig 1998-08-25 02:25:20.000000000 -0500 +++ 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_PREFIX = ${LOCALBASE} +TCL_EXEC_PREFIX = ${LOCALBASE} TCL_SHLIB_CFLAGS = -fPIC TCL_SHLIB_LD = gcc -shared TCL_CC = gcc -TCL_PACKAGE_PATH = /usr/local/tcl/8.0/lib +TCL_PACKAGE_PATH = ${PREFIX}/lib/tcl @@ -68,35 +68,23 @@ 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) $(OBJS) tclexpat.o -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lexpat -ltcl84 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 + cp $(LIB) 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)" ;\