start of automake support for ruby extension
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 17 Jan 2004 17:11:17 +0000 (17:11 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 17 Jan 2004 17:11:17 +0000 (17:11 +0000)
swig/ruby/Makefile.am

index 22c5ec4f740b8a473962a262e47ce51a8ae221c5..07241945c1a82089d98636b5d54a8d1684276f30 100644 (file)
@@ -1,13 +1,32 @@
 
-EXTRA_DIST = examples
+EXTRA_DIST = demo ext lib
 
-BUILT_SOURCES = comedi_ruby_wrap.c
+BUILT_SOURCES = ext/comedi_ruby_wrap.c
 
 if HAVE_SWIG
-comedi_ruby_wrap.c: ../comedi.i
-       $(SWIG) -ruby -o ./comedi_ruby_wrap.c ../comedi.i
+ext/comedi_ruby_wrap.c: ../comedi.i
+       $(SWIG) -ruby -o ./ext/comedi_ruby_wrap.c ../comedi.i
 else
-comedi_ruby_wrap.c:
+ext/comedi_ruby_wrap.c:
        echo WARNING: creating bogus comedi_ruby_wrap.c because you don\'t have swig.
-       touch comedi_ruby_wrap.c
+       touch ext/comedi_ruby_wrap.c
 endif
+
+if HAVE_RUBY
+all-local: ext/comedi.so
+install-data-local:
+       $(RUBY) setup.rb install
+else
+all-local:
+install-data-local:
+endif
+
+ext/Makefile:
+       $(RUBY) setup.rb config
+
+ext/comedi.so: ext/Makefile
+       $(RUBY) setup.rb setup
+
+clean-local:
+       $(RM) ext/comedi.so ext/Makefile
+