@@ -121,6 +121,14 @@ TCL_SRC_DIR = @TCL_SRC_DIR@
121121# Not used, but retained for reference of what libs Tcl required
122122# TCL_LIBS = @TCL_LIBS@
123123
124+
125+ # Variables for generating wrappers using SWIG
126+ SWIG = @SWIG@
127+ SWIGOUTPUT = @SWIGOUTPUT@
128+ SWIGINTERFACE = @SWIGINTERFACE@
129+ SWIGOBJECT = @SWIGOBJECT@
130+
131+
124132# ========================================================================
125133# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
126134# package without installing. The other environment variables allow us
@@ -190,7 +198,13 @@ VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \
190198# for the BINARIES that you specified above have already been done.
191199# ========================================================================
192200
193- all : binaries libraries doc
201+ all : @@SWIG_WRAP@@ binaries libraries
202+
203+
204+ wrap : $(SWIGOUTPUT )
205+
206+ $(SWIGOUTPUT ) : $(SWIGINTERFACE )
207+ $(SWIG ) -tcl -c++ -namespace $(PACKAGE_NAME ) -o $(SWIGOUTPUT ) $(SWIGINTERFACE )
194208
195209# ========================================================================
196210# The binaries target builds executable programs, Windows .dll's, unix
@@ -453,7 +467,7 @@ uninstall-binaries:
453467 rm -f " $( DESTDIR) $( bindir) /$$ p" ; \
454468 done
455469
456- .PHONY : all binaries clean depend distclean doc install libraries test
470+ .PHONY : all binaries clean depend distclean doc install libraries test wrap
457471.PHONY : gdb gdb-test valgrind valgrindshell
458472
459473# Tell versions [3.59,3.63) of GNU make to not export all variables.
0 commit comments