Automatically build (and install) the DUMM Ruby extension.
authorTobias Brunner <tobias@strongswan.org>
Wed, 20 May 2009 17:34:17 +0000 (19:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 20 May 2009 17:38:01 +0000 (19:38 +0200)
src/dumm/Makefile.am
src/dumm/ext/dumm.c
src/dumm/ext/extconf.rb.in

index 64e40ee..873ff21 100644 (file)
@@ -17,3 +17,16 @@ irdumm_LDADD = libdumm.la -lruby1.8
 INCLUDES = -I$(top_srcdir)/src/libstrongswan ${gtk_CFLAGS} \
   ${RUBYINCLUDE}
 AM_CFLAGS = -D_FILE_OFFSET_BITS=64
+
+all-local: ext
+
+clean-local:
+       (test -f ext/Makefile && cd ext && $(MAKE) clean && rm Makefile || true)
+
+install-data-local:
+       (test -f ext/Makefile && cd ext && $(MAKE) install)
+
+ext:   libdumm.la
+       (cd ext && $(RUBY) extconf.rb && $(MAKE))
+
+.PHONY: ext
index 3c860bb..f7caf25 100644 (file)
@@ -28,6 +28,7 @@
 #undef PACKAGE_TARNAME
 #undef PACKAGE_VERSION
 #undef PACKAGE_STRING
+#undef PACKAGE_BUGREPORT
 #include <ruby.h>
 
 static dumm_t *dumm;
index 658ab1f..36536ec 100644 (file)
@@ -5,6 +5,7 @@
 require 'mkmf'
 
 $defs << " @DEFS@"
+$CFLAGS << " -Wno-format"
 
 dir_config('dumm', '@top_srcdir@/src/dumm', '../.libs')
 dir_config('strongswan', '@top_srcdir@/src/libstrongswan', '../../libstrongswan/.libs')