2003-06-23 Anders Carlsson <andersca@codefactory.se>
authorAnders Carlsson <andersca@codefactory.se>
Mon, 23 Jun 2003 17:39:48 +0000 (17:39 +0000)
committerAnders Carlsson <andersca@codefactory.se>
Mon, 23 Jun 2003 17:39:48 +0000 (17:39 +0000)
* configure.in:
* gcj/.cvsignore:
* gcj/Hello.java:
* gcj/Makefile.am:
* gcj/TestMessage.java: (TestMessage), (TestMessage.main):
* gcj/org/.cvsignore:
* gcj/org/Makefile.am:
* gcj/org/freedesktop/.cvsignore:
* gcj/org/freedesktop/Makefile.am:
* gcj/org/freedesktop/dbus/.cvsignore:
* gcj/org/freedesktop/dbus/Makefile.am:
* gcj/org/freedesktop/dbus/Message.java: (Message),
(Message.Message):
* gcj/org/freedesktop/dbus/natMessage.cc:
Fix the build system.

14 files changed:
ChangeLog
configure.in
gcj/.cvsignore
gcj/Hello.java [deleted file]
gcj/Makefile.am
gcj/TestMessage.java [new file with mode: 0644]
gcj/org/.cvsignore [new file with mode: 0644]
gcj/org/Makefile.am [new file with mode: 0644]
gcj/org/freedesktop/.cvsignore [new file with mode: 0644]
gcj/org/freedesktop/Makefile.am [new file with mode: 0644]
gcj/org/freedesktop/dbus/.cvsignore [new file with mode: 0644]
gcj/org/freedesktop/dbus/Makefile.am [new file with mode: 0644]
gcj/org/freedesktop/dbus/Message.java [new file with mode: 0644]
gcj/org/freedesktop/dbus/natMessage.cc [new file with mode: 0644]

index 9e39835..c84cda1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2003-06-23  Anders Carlsson  <andersca@codefactory.se>
+
+       * configure.in:
+       * gcj/.cvsignore:
+       * gcj/Hello.java:
+       * gcj/Makefile.am:
+       * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
+       * gcj/org/.cvsignore:
+       * gcj/org/Makefile.am:
+       * gcj/org/freedesktop/.cvsignore:
+       * gcj/org/freedesktop/Makefile.am:
+       * gcj/org/freedesktop/dbus/.cvsignore:
+       * gcj/org/freedesktop/dbus/Makefile.am:
+       * gcj/org/freedesktop/dbus/Message.java: (Message),
+       (Message.Message):
+       * gcj/org/freedesktop/dbus/natMessage.cc:
+       Fix the build system.
+       
 2003-06-22  Havoc Pennington  <hp@pobox.com>
 
        * mono/Connection.cs: add more bindings
index 53b65fb..5d699fa 100644 (file)
@@ -798,6 +798,9 @@ dbus/Makefile
 glib/Makefile
 qt/Makefile
 gcj/Makefile
+gcj/org/Makefile
+gcj/org/freedesktop/Makefile
+gcj/org/freedesktop/dbus/Makefile
 mono/Makefile
 bus/Makefile
 tools/Makefile
index e250e08..3e5eeed 100644 (file)
@@ -2,12 +2,5 @@
 .libs
 Makefile
 Makefile.in
-*.lo
-*.la
-dbus-test
-*.bb
-*.bbg
-*.gcov
-*.da
-dbus-arch-deps.h
-.dbus-keyrings
+dbus-1.jar
+test-message
diff --git a/gcj/Hello.java b/gcj/Hello.java
deleted file mode 100644 (file)
index b7a1018..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-class Hello {
-    public static void main(String[] args) {
-        System.out.println("Hello World!"); //Display the string.
-    }
-}
\ No newline at end of file
index 8381afe..608cdbe 100644 (file)
@@ -1,5 +1,19 @@
-noinst_PROGRAMS=hello
+SUBDIRS=org
+JAR=jar
 
-hello_SOURCES=Hello.java
+CLEANFILES=dbus-1.jar
 
-hello_LDFLAGS=--main=Hello
+dbus-1.jar: 
+       -@rm -f dbus-1.jar
+       find org -type d -o -type f -name '*.class' | \
+       sed -e '/\/\./d' | \
+       $(JAR) cfM0E@ $@
+
+jardir = $(datadir)/java
+jar_DATA = dbus-1.jar
+
+noinst_PROGRAMS = test-message
+
+test_message_SOURCES = TestMessage.java
+test_message_LDFLAGS = --main=TestMessage
+test_message_LDADD = $(top_builddir)/gcj/org/freedesktop/dbus/libdbus-gcj-1.la
diff --git a/gcj/TestMessage.java b/gcj/TestMessage.java
new file mode 100644 (file)
index 0000000..6e17eaa
--- /dev/null
@@ -0,0 +1,8 @@
+import org.freedesktop.dbus.Message;
+
+public class TestMessage {
+    public static void main (String[] args) {
+       Message msg = new Message ("test", "bla");
+
+    }
+}
diff --git a/gcj/org/.cvsignore b/gcj/org/.cvsignore
new file mode 100644 (file)
index 0000000..22a4e72
--- /dev/null
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+
diff --git a/gcj/org/Makefile.am b/gcj/org/Makefile.am
new file mode 100644 (file)
index 0000000..a3e2122
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS=freedesktop
diff --git a/gcj/org/freedesktop/.cvsignore b/gcj/org/freedesktop/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/gcj/org/freedesktop/Makefile.am b/gcj/org/freedesktop/Makefile.am
new file mode 100644 (file)
index 0000000..ee8f397
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS=dbus
diff --git a/gcj/org/freedesktop/dbus/.cvsignore b/gcj/org/freedesktop/dbus/.cvsignore
new file mode 100644 (file)
index 0000000..1744d8c
--- /dev/null
@@ -0,0 +1,9 @@
+Makefile
+Makefile.in
+.deps
+.libs
+*.la
+*.class
+*.lo
+*.h
+
diff --git a/gcj/org/freedesktop/dbus/Makefile.am b/gcj/org/freedesktop/dbus/Makefile.am
new file mode 100644 (file)
index 0000000..8d67628
--- /dev/null
@@ -0,0 +1,55 @@
+INCLUDES=                                              \
+       -I$(top_srcdir)                                 \
+       -I$(top_builddir)/gcj/org/freedesktop/dbus      \
+        $(DBUS_CLIENT_CFLAGS) 
+
+
+GCJH = gcjh
+
+lib_LTLIBRARIES = libdbus-gcj-1.la
+
+MOSTLYCLEANFILES = $(generated_headers) $(java_class_files)
+
+
+java_sources =                                 \
+       Message.java
+
+native_sources =                       \
+       natMessage.cc
+
+generated_headers = $(java_sources:.java=.h)
+java_class_files = $(java_sources:.java=.class)
+native_object_files = $(native_sources:.cc=.lo)
+java_object_files = $(java_sources:.java=.lo)
+
+.class.h:
+       $(GCJH) $(basename $<)
+
+.java.class:
+       $(GCJ) -C $< -d ../../..
+
+.cc.lo:
+       $(LIBTOOL) --mode=compile $(CXX) $(INCLUDES) $(CXXFLAGS) $(CPPFLAGS) -c -o '$@' '$<'
+
+.java.lo:
+       $(LIBTOOL) --mode=compile $(GCJ) $(GCJ_FLAGS) -c -o '$@' '$<'
+
+libdbus_gcj_1_la_SOURCES =
+
+libdbus_gcj_1_la_DEPENDENCIES =        \
+       $(generated_headers)            \
+       $(native_object_files)          \
+       $(java_object_files)            \
+       $(java_class_files)
+
+
+libdbus_gcj_1_la_LIBADD =              \
+       $(native_object_files)          \
+       $(java_object_files)
+
+EXTRA_libdbus_gcj_1_la_SOURCES =       \
+       $(native_sources)               \
+       $(java_sources)
+
+libdbus_gcj_1_la_LINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) $(LDFLAGS) -o $@
+
diff --git a/gcj/org/freedesktop/dbus/Message.java b/gcj/org/freedesktop/dbus/Message.java
new file mode 100644 (file)
index 0000000..ede8b3a
--- /dev/null
@@ -0,0 +1,13 @@
+package org.freedesktop.dbus;
+
+import gnu.gcj.RawData;
+
+public class Message {
+    private RawData message;
+
+    public Message (String name, String destService) {
+       this.message = dbus_message_new (name, destService);
+    }
+
+    private static native RawData dbus_message_new (String name, String destService);
+}
diff --git a/gcj/org/freedesktop/dbus/natMessage.cc b/gcj/org/freedesktop/dbus/natMessage.cc
new file mode 100644 (file)
index 0000000..d8b1903
--- /dev/null
@@ -0,0 +1,20 @@
+// This file was created by `gcjh -stubs'. -*- c++ -*-
+//
+// This file is intended to give you a head start on implementing native
+// methods using CNI.
+// Be aware: running `gcjh -stubs ' once more for this class may
+// overwrite any edits you have made to this file.
+
+#include <Message.h>
+#include <gcj/cni.h>
+#include <java/lang/UnsupportedOperationException.h>
+
+#include <dbus/dbus.h>
+
+::gnu::gcj::RawData *
+org::freedesktop::dbus::Message::dbus_message_new (::java::lang::String *, ::java::lang::String *)
+{
+  throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("org::freedesktop::dbus::Message::dbus_message_new (::java::lang::String *, ::java::lang::String *) not implemented"));
+}
+
+