machista_wrap.c regeneration

Clemens Lang cal at macports.org
Thu Jan 5 17:29:46 PST 2012


On Fri, Jan 06, 2012 at 12:22:33PM +1100, Joshua Root wrote:
> It shouldn't be hard to write the make rules such that the .c depends
> on the .i and swig only gets run when the former is missing or the
> latter has changed.

Maybe I'm wrong, but as far as I can see, this is the case:

SWIG_IFACE = machista.i
SWIG_SRCS  = ${SWIG_IFACE:%.i=%_wrap.c}
SWIG_OBJS  = ${SIWG_SRCS:%.c=%.o}

${SWIG_SRCS}:: ${SWIG_IFACE}
ifdef SWIG
	${SWIG} ${SWIG_FLAGS} $<
else
	@echo "A lot of warnings about how to get the correct file back without having swig"
	@exit 1
endif

${SWIG_OBJS}:: ${SWIG_SRCS}

(see base/src/machista1.0/Makefile.in)

Also, the clean target contains another ifdef to prevent deleting the
file if you don't have SWIG.

-- 
Clemens Lang
GSoC Student



More information about the macports-dev mailing list