From: Frank Mori Hess Date: Sat, 19 Jun 2004 15:06:00 +0000 (+0000) Subject: fix compilation when builddir != srcdir X-Git-Tag: r0_7_22~36 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d20c5e18c9e3a41ae48641b0e80920b225ea208f;p=comedilib.git fix compilation when builddir != srcdir --- diff --git a/swig/python/Makefile.am b/swig/python/Makefile.am index 8930933..b60afa9 100644 --- a/swig/python/Makefile.am +++ b/swig/python/Makefile.am @@ -16,10 +16,10 @@ pyexec_SCRIPTS = comedi.py EXTRA_DIST = README.txt comedi.py setup.py test_comedi.py if HAVE_SWIG -comedi_python_wrap.c: ../comedi.i - $(SWIG) -python -o ./comedi_python_wrap.c ../comedi.i +$(srcdir)/comedi_python_wrap.c: $(srcdir)/../comedi.i + $(SWIG) -python -o $(srcdir)/comedi_python_wrap.c $(srcdir)/../comedi.i else -comedi_python_wrap.c: +$(srcdir)/comedi_python_wrap.c: echo WARNING: creating bogus comedi_python_wrap.c because you don\'t have swig. - touch comedi_python_wrap.c + touch $(srcdir)/comedi_python_wrap.c endif diff --git a/swig/ruby/Makefile.am b/swig/ruby/Makefile.am index cfcc1ce..dc40523 100644 --- a/swig/ruby/Makefile.am +++ b/swig/ruby/Makefile.am @@ -1,34 +1,31 @@ EXTRA_DIST = demo lib -#BUILT_SOURCES = ext/comedi_ruby_wrap.c +BUILT_SOURCES = ext/comedi_ruby_wrap.c if HAVE_SWIG -ext/comedi_ruby_wrap.c: $(srcdir)/../comedi.i - mkdir -p ext - cp $(srcdir)/../comedi.i ext/comedi.i - $(SWIG) -ruby -o ext/comedi_ruby_wrap.c ext/comedi.i +$(srcdir)/ext/comedi_ruby_wrap.c: $(srcdir)/../comedi.i + $(SWIG) -ruby -o $(srcdir)/ext/comedi_ruby_wrap.c $(srcdir)/../comedi.i else -ext/comedi_ruby_wrap.c: - mkdir -p ext +$(srcdir)/ext/comedi_ruby_wrap.c: echo WARNING: creating bogus comedi_ruby_wrap.c because you don\'t have swig. - touch ext/comedi_ruby_wrap.c + touch $(srcdir)/ext/comedi_ruby_wrap.c endif if HAVE_RUBY all-local: ext/comedi.so install-data-local: - $(RUBY) setup.rb install + $(RUBY) $(srcdir)/setup.rb install else all-local: install-data-local: endif ext/Makefile: - $(RUBY) setup.rb config $(RUBY_CONFIG_OPTIONS) + $(RUBY) $(srcdir)/setup.rb config $(RUBY_CONFIG_OPTIONS) -ext/comedi.so ext/comedi_ruby_wrap.o: ext/Makefile ext/comedi_ruby_wrap.c - $(RUBY) setup.rb setup +ext/comedi.so ext/comedi_ruby_wrap.o: ext/Makefile $(srcdir)/ext/comedi_ruby_wrap.c + $(RUBY) $(srcdir)/setup.rb setup clean-local: $(RM) ext/comedi.so ext/Makefile ext/*.o