'setup.rb config' calls 'extconf.rb' in the ext directory to build the extension
Makefile. 'extconf.rb' looks for C source files in the directory when it runs,
so SWIG needs to run before 'setup.rb config'. The attached patch makes the
output of SWIG a prerequisite for ext/Makefile.
install-data-local:
endif
-ext/Makefile config.save:
+ext/Makefile config.save: $(srcdir)/ext/comedi_ruby_wrap.c
$(RUBY) $(srcdir)/setup.rb config $(RUBY_CONFIG_OPTIONS) -- --with-comedilib-dir=../../..
-ext/comedi.so ext/comedi_ruby_wrap.o: ext/Makefile config.save $(srcdir)/ext/comedi_ruby_wrap.c
+ext/comedi.so ext/comedi_ruby_wrap.o: ext/Makefile config.save
$(RUBY) $(srcdir)/setup.rb setup
if HAVE_RUBY