After being away for about five months, I'm back working on this... For
authorTor Lillqvist <tml@iki.fi>
Thu, 30 Aug 2001 05:09:11 +0000 (05:09 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 30 Aug 2001 05:09:11 +0000 (05:09 +0000)
2001-08-30  Tor Lillqvist  <tml@iki.fi>

After being away for about five months, I'm back working on
this...  For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.

* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.

* makefile.mingw.in
* makefile.msc.in: Removed.

* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.

* Makefile.am
* glib/Makefile.am: Corresponding changes.

* glib/glib.def: Fix typo, add new entries.

* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)

* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.

* */makefile.mingw.in: Reflect new location of glib library.

26 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
glib/Makefile.am
glib/glib.def
glib/glib.rc.in [moved from glib.rc.in with 100% similarity]
glib/gspawn-win32-helper.c
glib/gspawn-win32.c
glib/gstrfuncs.c
glib/gstrfuncs.h
glib/makefile.mingw.in
glib/makefile.msc.in
gmodule/makefile.mingw.in
gobject/makefile.mingw.in
gthread/makefile.mingw.in
makefile.mingw [new file with mode: 0644]
makefile.mingw.in [deleted file]
makefile.msc [moved from makefile.msc.in with 65% similarity]
tests/makefile.mingw.in
tests/spawn-test.c

index 0a6143a..708056f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 0a6143a..708056f 100644 (file)
@@ -1,3 +1,36 @@
+2001-08-30  Tor Lillqvist  <tml@iki.fi>
+
+       After being away for about five months, I'm back working on
+       this...  For now, still using same build setup for Win32. Probably
+       will change to not including version numbers in the import library
+       names, though. (But the DLL names would still include them,
+       possibly even also the micro version number.) That would be more
+       Unix-like. Also, will have to check out newest mingw tool versions
+       to see if the build-dll script now can be retired.
+       
+       * makefile.mingw
+       * makefile.msc: New files, no need to generate from .in as
+       they don't contain references to automake variables.
+       
+       * makefile.mingw.in
+       * makefile.msc.in: Removed.
+       
+       * glib.rc.in: Remove
+       * glib/glib.rc.in: Moved here.
+       
+       * Makefile.am
+       * glib/Makefile.am: Corresponding changes.
+
+       * glib/glib.def: Fix typo, add new entries.
+
+       * glib/gspawn-win32-helper.c: More debugging. Doesn't work
+       currently (or then it never has on Win2k, which I now use?)
+
+       * glib/gstrfuncs.c
+       * glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
+
+       * */makefile.mingw.in: Reflect new location of glib library.
+       
 2001-08-30  Michael Natterer  <mitch@gimp.org>
 
        * glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
index 43764b5..6b21f7c 100644 (file)
@@ -15,12 +15,11 @@ EXTRA_DIST =                        \
        sanity_check            \
        README.win32            \
        TODO.xml                \
-       makefile.msc.in         \
-       makefile.mingw.in       \
+       makefile.msc            \
+       makefile.mingw          \
        glibconfig.h.win32.in   \
        config.h.win32.in       \
        build-dll               \
-       glib.rc.in              \
        glib-2.0.pc.in          \
        gobject-2.0.pc.in       \
        gmodule-2.0.pc.in       \
@@ -32,8 +31,6 @@ EXTRA_DIST =                  \
 
 # These may be in the builddir too
 BUILT_EXTRA_DIST =             \
-       makefile.msc            \
-       makefile.mingw          \
        glibconfig.h.win32      \
        config.h.win32          \
        glib.rc                 \
@@ -70,12 +67,6 @@ glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win
 config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
        cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
-       cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
-       cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
 glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
        cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
index 83aa0f4..ef6d54d 100644 (file)
@@ -7,6 +7,12 @@ EXTRA_DIST =                   \
        gen-unicode-tables.pl   \
        glib.def
 
+# These may be in the builddir too
+BUILT_EXTRA_DIST =             \
+       makefile.msc            \
+       makefile.mingw          \
+       glib.rc
+
 lib_LTLIBRARIES = libglib-1.3.la
 
 libglib_1_3_la_SOURCES =       \
index 870359e..325660a 100644 (file)
@@ -12,10 +12,15 @@ EXPORTS
        g_array_sized_new
        g_array_sort
        g_array_sort_with_data
+       g_ascii_digit_value
        g_ascii_strcasecmp
        g_ascii_strncasecmp
        g_ascii_strdown
        g_ascii_strup
+       g_ascii_table
+       g_ascii_tolower
+       g_ascii_toupper
+       g_ascii_xdigit_value
        g_async_queue_length
        g_async_queue_length_unlocked
        g_async_queue_lock
@@ -194,7 +199,7 @@ EXPORTS
        g_io_channel_get_buffer_condition
        g_io_channel_get_buffer_size
        g_io_channel_get_buffered
-       g_io_channel_get_close_of_unref
+       g_io_channel_get_close_on_unref
        g_io_channel_get_encoding
        g_io_channel_get_flags
        g_io_channel_get_line_term
@@ -211,7 +216,7 @@ EXPORTS
        g_io_channel_seek_position
        g_io_channel_set_buffer_size
        g_io_channel_set_buffered
-       g_io_channel_set_close_of_unref
+       g_io_channel_set_close_on_unref
        g_io_channel_set_encoding
        g_io_channel_set_flags
        g_io_channel_set_line_term
@@ -338,6 +343,7 @@ EXPORTS
        g_node_reverse_children
        g_node_traverse
        g_node_unlink
+       g_nullify_pointer
        g_on_error_query
        g_on_error_stack_trace
        g_parse_debug_string
@@ -433,6 +439,7 @@ EXPORTS
        g_set_print_handler
        g_set_printerr_handler
        g_set_warning_handler
+       g_shell_error_quark
        g_shell_parse_argv
        g_shell_quote
        g_shell_unquote
@@ -562,6 +569,9 @@ EXPORTS
        g_strreverse
        g_strsignal
        g_strsplit
+       g_strrstr
+       g_strrstr_len
+       g_strstr_len
        g_strtod
        g_strup
        g_thread_create_full
similarity index 100%
rename from glib.rc.in
rename to glib/glib.rc.in
index cd419b2..59709b8 100644 (file)
 #define GSPAWN_HELPER
 #include "gspawn-win32.c"      /* For shared definitions */
 
+static GString *debugstring;
+
 static void
 write_err_and_exit (gint fd,
                    gint msg)
 {
   gint en = errno;
   
+  if (debug)
+    {
+      debugstring = g_string_new ("");
+      g_string_append (debugstring,
+                      g_strdup_printf ("writing error code %d and errno %d",
+                                       msg, en));
+      MessageBox (NULL, debugstring->str, "gspawn-win32-helper", 0);
+    }
+
   write (fd, &msg, sizeof(msg));
   write (fd, &en, sizeof(en));
   
@@ -59,7 +70,7 @@ WinMain (struct HINSTANCE__ *hInstance,
   int i;
   int fd;
   int mode;
-  GString *debugstring;
+  gint zero = 0;
 
   SETUP_DEBUG();
 
@@ -212,7 +223,9 @@ WinMain (struct HINSTANCE__ *hInstance,
       if (spawnv (mode, __argv[ARG_PROGRAM], __argv+ARG_PROGRAM) < 0)
        write_err_and_exit (child_err_report_fd, CHILD_SPAWN_FAILED);
     }
-
+  write (child_err_report_fd, &zero, sizeof (zero));
+  write (child_err_report_fd, &zero, sizeof (zero));
+  Sleep (10000);
   return 0;
 }
 
index d92744a..91acb46 100644 (file)
  * Thus, we must in most cases use a helper program to handle closing
  * of (inherited) file descriptors and changing of directory. In fact,
  * we do it all the time.
- *
- * This source file contains the source for that helper program.
- * To compile it, #define GSPAWN_HELPER.
  */
 
 /* Define this to get some logging all the time */
-/* #define G_SPAWN_WIN32_DEBUG */
+#define G_SPAWN_WIN32_DEBUG
 
 #include "glib.h"
 
index eb0393d..af3b99c 100644 (file)
@@ -53,6 +53,9 @@
  * inteferes with g_strsignal() on some OSes
  */
 
+#if defined(G_PLATFORM_WIN32) && defined(__GNUC__)
+__declspec(dllexport)
+#endif
 const guint16 g_ascii_table[256] = {
   0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004,
   0x004, 0x104, 0x104, 0x004, 0x104, 0x104, 0x004, 0x004,
index 95667aa..1dfb024 100644 (file)
@@ -47,7 +47,7 @@ typedef enum {
   G_ASCII_XDIGIT = 1 << 10
 } GAsciiType;
 
-extern const guint16 g_ascii_table[256];
+GLIB_VAR const guint16 g_ascii_table[256];
 
 #define g_ascii_isalnum(c) \
   ((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0)
index 990d909..e8f882d 100644 (file)
@@ -83,11 +83,11 @@ endif
 
 ################ glib
 
-#glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
-#      ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
-
 glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
-       dllwrap --mno-cygwin --dllname glib-$(GLIB_VER).dll --implib glib-$(GLIB_VER).lib --def glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
+       ../build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
+
+#glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
+#      dllwrap --mno-cygwin --dllname glib-$(GLIB_VER).dll --implib glib-$(GLIB_VER).lib --def glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
 
 gspawn-win32-helper.exe : gspawn-win32-helper.c
        $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
index e78259e..d8facbd 100644 (file)
@@ -94,4 +94,4 @@ gspawn-win32-helper.exe : gspawn-win32-helper.c glib-$(GLIB_VER).dll
 
 clean::
        del ..\config.h
-       del glibconfig.h
+       del ..\glibconfig.h
index c21511f..6f1b4ad 100644 (file)
@@ -14,7 +14,7 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 # Nothing much configurable below
 
-INCLUDES = -I .. -I .
+INCLUDES = -I .. -I ../glib -I .
 DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
 
 BUILD_DLL = ../build-dll
@@ -37,7 +37,7 @@ gmoduleconf.h: gmoduleconf.h.win32
        cp $< $@
 
 gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def
-       $(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) -L .. -lglib-$(GLIB_VER)
+       $(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib-$(GLIB_VER)
 
 ################ test prog
 
@@ -45,14 +45,14 @@ testgmodule.exe : gmodule-$(GLIB_VER).dll testgmodule.o libgplugin_a.dll libgplu
 # Wow, do we really have to do it like this to get some symbols
 # exported from a .exe? Apparently yes. Does the __declspec(dllexport) 
 # actually do anything in gcc?
-       $(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base -o testgmodule.exe testgmodule.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base -o testgmodule.exe testgmodule.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
        $(DLLTOOL) --base-file testgmodule.base --output-exp testgmodule.exp testgmodule.o
-       $(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base,testgmodule.exp -o testgmodule.exe testgmodule.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base,testgmodule.exp -o testgmodule.exe testgmodule.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
        $(DLLTOOL) --base-file testgmodule.base --output-exp testgmodule.exp testgmodule.o
-       $(CC) $(CFLAGS) -Wl,testgmodule.exp -o testgmodule.exe testgmodule.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -Wl,testgmodule.exp -o testgmodule.exe testgmodule.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
 
 libgplugin_a.dll : libgplugin_a.o
-       $(BUILD_DLL) libgplugin_a - - libgplugin_a.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
+       $(BUILD_DLL) libgplugin_a - - libgplugin_a.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
 
 libgplugin_b.dll : libgplugin_b.o
-       $(BUILD_DLL) libgplugin_b - - libgplugin_b.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
+       $(BUILD_DLL) libgplugin_b - - libgplugin_b.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
index 832dc02..0674103 100644 (file)
@@ -14,7 +14,7 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 # Nothing much configurable below
 
-INCLUDES = -I .. -I .
+INCLUDES = -I .. -I ../glib -I .
 DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gruntime -DG_ENABLE_DEBUG
 
 srcdir=.
index d1adee3..ccf7d70 100644 (file)
@@ -14,7 +14,7 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 # Nothing much configurable below
 
-INCLUDES = -I .. -I .
+INCLUDES = -I .. -I ../glib -I .
 DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GThread\" -DG_ENABLE_DEBUG
 
 BUILD_DLL = ../build-dll
@@ -32,4 +32,4 @@ gthread_OBJECTS = \
        gthread-impl.o
 
 gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) gthread.def
-       $(BUILD_DLL) gthread $(GLIB_VER) gthread.def $(gthread_OBJECTS) -L .. -lglib-$(GLIB_VER)
+       $(BUILD_DLL) gthread $(GLIB_VER) gthread.def $(gthread_OBJECTS) -L ../glib -lglib-$(GLIB_VER)
diff --git a/makefile.mingw b/makefile.mingw
new file mode 100644 (file)
index 0000000..b371151
--- /dev/null
@@ -0,0 +1,12 @@
+## Makefile for building the GLib DLLs with gcc for mingw. The build
+## uses tools running on cygwin, however.
+
+## Use: make -f makefile.mingw
+
+PARTS=glib gmodule gthread gobject tests
+
+all :
+       for D in $(PARTS); do (cd $$D && $(MAKE) -f makefile.mingw all); done
+
+clean :
+       for D in $(PARTS); do (cd $$D && $(MAKE) -f makefile.mingw clean); done
diff --git a/makefile.mingw.in b/makefile.mingw.in
deleted file mode 100644 (file)
index 0322d79..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-## Makefile for building the GLib DLL with gcc for mingw. The build
-## uses tools running on cygwin, however.
-
-## Use: make -f makefile.mingw
-
-TOP = ..
-
-include build/win32/make.mingw
-
-# Possibly override GLib version in build/win32/module.defs
-GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
-
-################################################################
-
-# Nothing much configurable below
-
-INCLUDES = -I .
-DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib -DG_ENABLE_DEBUG -DDLL_EXPORT
-DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
-
-DLLS_TO_BUILD =                                \
-       glib-$(GLIB_VER).dll            \
-       sub-gmodule                     \
-       sub-gthread                     \
-       sub-gobject
-
-all :                          \
-       config.h                \
-       glibconfig.h            \
-       $(DLLS_TO_BUILD)        \
-       gspawn-win32-helper.exe \
-       testglib.exe            \
-       testgdate.exe           \
-       testgdateparser.exe
-
-glib_OBJECTS =                 \
-       garray.o                \
-       gasyncqueue.o           \
-       gbacktrace.o            \
-       gcache.o                \
-       gcompletion.o           \
-       gconvert.o              \
-       gdataset.o              \
-       gdate.o                 \
-       gerror.o                \
-       gfileutils.o            \
-       ghash.o                 \
-       ghook.o                 \
-       giochannel.o            \
-       giowin32.o              \
-       glist.o                 \
-       gmain.o                 \
-       gmarkup.o               \
-       gmem.o                  \
-       gmessages.o             \
-       gnode.o                 \
-       gpattern.o              \
-       gprimes.o               \
-       gqsort.o                \
-       gqueue.o                \
-       grand.o                 \
-       grel.o                  \
-       gscanner.o              \
-       gshell.o                \
-       gslist.o                \
-       gspawn-win32.o          \
-       gstrfuncs.o             \
-       gstring.o               \
-       gthread.o               \
-       gthreadpool.o           \
-       gtimer.o                \
-       gtree.o                 \
-       gunibreak.o             \
-       gunidecomp.o            \
-       guniprop.o              \
-       gutf8.o                 \
-       gutils.o                \
-       gwin32.o
-
-glibconfig.h: glibconfig.h.win32
-       cp $< $@
-
-config.h: config.h.win32
-       cp $< $@
-
-ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
-makefile.mingw: makefile.mingw.in
-       sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
-           -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
-endif
-
-################ glib
-
-glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
-       ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
-
-gspawn-win32-helper.exe : gspawn-win32-helper.c
-       $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
-
-################ subdirectories
-
-sub-gmodule :
-       cd gmodule && $(MAKE) -f makefile.mingw all
-
-sub-gthread :
-       cd gthread && $(MAKE) -f makefile.mingw all
-
-sub-gobject :
-       cd gobject && $(MAKE) -f makefile.mingw all
-
-################ test progs
-
-testglib.o : testglib.c
-       $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
-
-testglib.exe : glib-$(GLIB_VER).dll testglib.o
-       $(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
-
-testgdate.o : testgdate.c
-       $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
-
-testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
-       $(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
-
-testgdateparser.o : testgdateparser.c
-       $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
-
-testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
-       $(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
-
-
-################ other stuff
-
-clean::
-       -rm config.h glibconfig.h gmodule/gmoduleconf.h
similarity index 65%
rename from makefile.msc.in
rename to makefile.msc
index c336020..433c1f2 100644 (file)
@@ -1,10 +1,6 @@
 ## Makefile for building the GLib dlls with Microsoft C
 ## Use: nmake -f makefile.msc
 
-TOP = ..
-
-!INCLUDE $(TOP)\build\win32\make.msc
-
 PARTS = glib gmodule gthread gobject tests
 
 all : \
@@ -12,15 +8,17 @@ all : \
        sub-all
 
 sub-all: 
-       for %d in ($(PARTS)) do nmake -nologo -f makefile.msc sub-one THIS=%d
+       for %d in ($(PARTS)) do nmake -nologo -f makefile.msc sub-one THIS=%d TARGET=all
+
+clean : sub-clean
+
+sub-clean:
+       for %d in ($(PARTS)) do nmake -nologo -f makefile.msc sub-one THIS=%d TARGET=clean
 
 sub-one:
        @cd $(THIS)
-       @nmake -nologo -f makefile.msc
+       @nmake -nologo -f makefile.msc $(TARGET)
        @cd ..
 
 config.h: config.h.win32
        copy config.h.win32 config.h
-
-glibconfig.h: glibconfig.h.win32
-       copy glibconfig.h.win32 glibconfig.h
index cef5965..30e6a51 100644 (file)
@@ -12,12 +12,15 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 # Nothing much configurable below
 
-INCLUDES = -I .. -I ../gmodule
+INCLUDES = -I .. -I ../glib -I ../gmodule
 DEFINES = -DHAVE_CONFIG_H
 
 BUILD_DLL = ../build-dll
 
 TESTS = \
+       testglib.exe    \
+       testgdate.exe   \
+       testgdateparser.exe \
        array-test.exe  \
        date-test.exe   \
        dirname-test.exe\
@@ -41,10 +44,12 @@ TESTS = \
        tree-test.exe   \
        type-test.exe   \
        unicode-encoding.exe \
+
+DLLS = \
        libmoduletestplugin_a.dll \
        libmoduletestplugin_b.dll
 
-all:   $(TESTS)
+all:   $(TESTS) $(DLLS)
 
 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
 makefile.mingw: makefile.mingw.in
@@ -55,20 +60,20 @@ endif
 .SUFFIXES: .c .i .exe
 
 .c.exe:
-       $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-$(GLIB_VER) -L .. -lglib-$(GLIB_VER) 
+       $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-$(GLIB_VER) -L ../glib -lglib-$(GLIB_VER) 
 
 module-test.exe : module-test.o
-       $(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
        $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
-       $(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
        $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
-       $(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
 
 libmoduletestplugin_a.dll : libmoduletestplugin_a.o
-       $(BUILD_DLL) libmoduletestplugin_a - - libmoduletestplugin_a.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
+       $(BUILD_DLL) libmoduletestplugin_a - - libmoduletestplugin_a.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
 
 libmoduletestplugin_b.dll : libmoduletestplugin_b.o
-       $(BUILD_DLL) libmoduletestplugin_b - - libmoduletestplugin_b.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
+       $(BUILD_DLL) libmoduletestplugin_b - - libmoduletestplugin_b.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
 
 check: all
        @for P in $(TESTS) ; do echo $$P; ./$$P; done
index a508fd3..1234df0 100644 (file)
@@ -121,5 +121,3 @@ main (int   argc,
   
   return 0;
 }
-
-