Permalink
Browse files

Switch to autotools

Note that the examples are not yet built.
  • Loading branch information...
1 parent 32f811b commit 661efb3809d90ca6e6109011dfa7283d0bb89c70 Alp Toker committed Oct 7, 2007
Showing with 127 additions and 62 deletions.
  1. 0 ChangeLog
  2. +0 −2 Makefile
  3. +22 −0 Makefile.am
  4. 0 NEWS
  5. +55 −0 configure.ac
  6. +0 −40 examples/Makefile
  7. +4 −0 examples/Makefile.am
  8. +1 −1 ndesk-dbus-glib-1.0.pc.in
  9. +0 −19 src/Makefile
  10. +45 −0 src/Makefile.am
View
No changes.
View
@@ -1,2 +0,0 @@
-all:
- $(MAKE) -C src
View
@@ -0,0 +1,22 @@
+SUBDIRS = src examples
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ndesk-dbus-glib-1.0.pc
+
+EXTRA_DIST = \
+ ndesk-dbus-glib-1.0.pc.in \
+ ndesk.snk
+
+DISTCLEANFILES = \
+ ndesk-dbus-glib-1.0.pc
+
+MAINTAINERCLEANFILES = \
+ INSTALL \
+ Makefile.in \
+ aclocal.m4 \
+ config.guess \
+ config.sub \
+ configure \
+ install-sh \
+ missing
+
View
0 NEWS
No changes.
View
@@ -0,0 +1,55 @@
+AC_INIT(src/GLib.cs)
+
+AC_CANONICAL_SYSTEM
+AC_PREREQ(2.13)
+
+API_VERSION=1.0
+#VERSION=$API_VERSION.0
+VERSION=0.3.0
+
+AC_SUBST(API_VERSION)
+AC_SUBST(VERSION)
+
+AM_INIT_AUTOMAKE(ndesk-dbus-glib, $VERSION)
+
+AM_MAINTAINER_MODE
+
+AC_PROG_INSTALL
+
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test "x$PKG_CONFIG" = "xno"; then
+ AC_MSG_ERROR([You need to install pkg-config])
+fi
+AC_SUBST(PKG_CONFIG)
+
+MONO_REQ_VERSION=1.1.13
+PKG_CHECK_MODULES(MONO, mono >= $MONO_REQ_VERSION)
+
+AC_PATH_PROG(GMCS, gmcs, no)
+if test "x$GMCS" = "xno"; then
+ AC_MSG_ERROR([You need to install gmcs])
+fi
+AC_SUBST(GMCS)
+
+AC_PATH_PROG(GACUTIL, gacutil, no)
+if test "x$GACUTIL" = "xno"; then
+ AC_MSG_ERROR([You need to install gacutil])
+fi
+AC_SUBST(GACUTIL)
+
+NDESK_DBUS_REQUIRED_VERSION=0.4
+PKG_CHECK_MODULES(NDESK_DBUS, ndesk-dbus-1.0 >= $NDESK_DBUS_REQUIRED_VERSION)
+AC_SUBST(NDESK_DBUS_LIBS)
+
+#GLIB_REQUIRED_VERSION=2.0
+#PKG_CHECK_MODULES(GLIB, gobject-2.0 >= $GTK_REQUIRED_VERSION)
+#AC_SUBST(GLIB_CFLAGS)
+#AC_SUBST(GLIB_LIBS)
+
+AC_OUTPUT([
+Makefile
+ndesk-dbus-glib-1.0.pc
+src/Makefile
+examples/Makefile
+])
+
View
@@ -1,40 +0,0 @@
-DBUS_SHARP_PREFIX=../../dbus-sharp
-DBUS_SHARP_GLIB_PREFIX=..
-
-# See How Not to Use VPATH: http://make.paulandlesley.org/vpath.html
-VPATH=$(DBUS_SHARP_PREFIX)/src $(DBUS_SHARP_GLIB_PREFIX)/src
-
-#Note that this makefile isn't healthy, but it works for me
-#Makefile bug: doesn't seem to work with make -B
-
-all: run test.exe test-export.exe test-system-bus.exe
-
-test.exe: PKGS = gtk-sharp-2.0
-
-test.exe: NDesk.DBus.dll NDesk.DBus.GLib.dll Test.cs
-
-test-export.exe: PKGS = gtk-sharp-2.0
-
-test-export.exe: NDesk.DBus.dll NDesk.DBus.GLib.dll TestExport.cs
-
-test-system-bus.exe: PKGS = gtk-sharp-2.0
-
-test-system-bus.exe: NDesk.DBus.dll NDesk.DBus.GLib.dll TestSystemBus.cs
-
-test-ui.exe: PKGS = gtk-sharp-2.0
-
-test-ui.exe: NDesk.DBus.dll NDesk.DBus.GLib.dll TestUI.cs
-
-test-threads.exe: PKGS = gtk-sharp-2.0
-
-test-threads.exe: NDesk.DBus.dll NDesk.DBus.GLib.dll TestThreads.cs
-
-
-run:
- echo '#!/bin/sh' > $@
- echo 'export MONO_PATH=$(DBUS_SHARP_GLIB_PREFIX)/src:$(DBUS_SHARP_PREFIX)/src:$$MONO_PATH' >> $@
- echo '$(RUNTIME) $$@' >> $@
- chmod +x $@
-
-
-include $(DBUS_SHARP_PREFIX)/include.mk
View
@@ -0,0 +1,4 @@
+EXTRA_DIST = \
+ Test.cs \
+ TestExport.cs \
+ TestSystemBus.cs
@@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib
Name: NDesk.DBus.GLib
Description: GLib integration for NDesk.DBus, the D-Bus IPC library
-Version: 0.3.0
+Version: @VERSION@
URL: http://www.ndesk.org/DBusSharp
Requires: ndesk-dbus-1.0
Libs: -r:${libdir}/mono/ndesk-dbus-glib-1.0/NDesk.DBus.GLib.dll
View
@@ -1,19 +0,0 @@
-DBUS_SHARP_PREFIX=../../dbus-sharp
-
-# See How Not to Use VPATH: http://make.paulandlesley.org/vpath.html
-VPATH=$(DBUS_SHARP_PREFIX)/src
-
-#Note that this makefile isn't healthy, but it works for me
-#Makefile bug: doesn't seem to work with make -B
-
-#.PHONY: all
-
-all: NDesk.DBus.GLib.dll
-
-NDesk.DBus.GLib.dll: NDesk.DBus.dll AssemblyInfo.cs GLib.IO.cs GLib.cs ../ndesk.snk
-
-.PHONY:
-install: NDesk.DBus.GLib.dll
- $(GACUTIL) $(GACUTIL_FLAGS) -i NDesk.DBus.GLib.dll -f -package ndesk-dbus-glib-1.0
-
-include $(DBUS_SHARP_PREFIX)/include.mk
View
@@ -0,0 +1,45 @@
+ASSEMBLY = NDesk.DBus.GLib
+TARGET = $(ASSEMBLY).dll
+
+CSFLAGS = \
+ -debug -target:library -keyfile:../ndesk.snk
+
+LIBFLAGS = \
+ $(NDESK_DBUS_LIBS)
+
+CSFILES = \
+ $(srcdir)/AssemblyInfo.cs \
+ $(srcdir)/GLib.cs \
+ $(srcdir)/GLib.IO.cs
+
+all: $(TARGET)
+
+#$(TARGET): $(CSFILES) AssemblyInfo.cs
+$(TARGET): $(CSFILES)
+ $(GMCS) -out:$@ $(CSFLAGS) $(LIBFLAGS) $^
+
+install-data-local:
+ @if test -n '$(TARGET)'; then \
+ echo "$(GACUTIL) /i $(TARGET) /f /gacdir $(DESTDIR)$(libdir)"; \
+ $(GACUTIL) /i $(TARGET) /package $(ASSEMBLY) /f /gacdir $(libdir) /root $(DESTDIR)$(libdir) || exit 1; \
+ fi
+
+uninstall-local:
+ @if test -n '$(TARGET)'; then \
+ echo "$(GACUTIL) /u $(ASSEMBLY) /gacdir $(DESTDIR)$(libdir)"; \
+ $(GACUTIL) /u $(ASSEMBLY) /package $(ASSEMBLY) /gacdir $(libdir) /root $(DESTDIR)$(libdir) || exit 1; \
+ fi
+
+EXTRA_DIST = \
+ $(CSFILES)
+# $(srcdir)/AssemblyInfo.cs.in
+
+CLEANFILES = \
+ $(TARGET) \
+ $(TARGET).mdb
+
+#DISTCLEANFILES = \
+# AssemblyInfo.cs
+
+MAINTAINERCLEANFILES = \
+ Makefile.in

0 comments on commit 661efb3

Please sign in to comment.