On 26/10/14 18:25, Matthew Brush wrote:
> On 14-10-26 07:14 AM, Enrico Tröger wrote:
>> Hi,
>>
>>> I don't really know enough about Waf to fix it. Since it needs Python
>>> anyway, we could just use one of its XML libraries to grab the names
>>> from the GtkBuilder file, and do the replacements using its
>>> text-handling functions. It wouldn't require sed/sort utils. I
>>> originally had a Python script[3] doing this, but I'm just not sure how
>>> to integrate that code into Waf.
>>
>> I' work on the Waf part but this will take at least two weeks as I'm
>> almost not on the PC during the next two weeks.
>>
> 
> OK.

I got a very basic working version, see attachment.
However, I almost didn't test it and things like library versioning are
missing.
As said, the rest will take some time.


>>> If the Win32 Nightlies break it will most likely be trivial changes to
>>> the Makefile.ams. I don't have an environment like it uses to test.
>>
>> The Win32 nightlies are built using Waf, so fixing Waf will fix it all
>> :).
>>
> 
> I thought the nightlies were using Mingw because there's all those
> duplicate code paths in the Makefile.ams for Mingw. Who uses those?

We added those years ago to support cross-compilation. IIRC this was
before Waf.
Yeah, we really should consolidate the available build systems and clean
up the rest :).
I don't use autotools based cross-compilation.


>>> Geany-Plugins Autotools should be fine since it will pickup the new
>>
>> I checked out codebrainz/wip/linkage-cleanup but got build errors with
>> autotools:
>>
>> -----------snip-------------
>> tm_source_file.c:31:60: fatal error: ../src/pluginexport.h: No such file
>> or directory
>>   #include "../src/pluginexport.h" /* for GEANY_API_SYMBOL */
>>                                                              ^
>> compilation terminated.
>> Makefile:490: recipe for target 'tm_source_file.lo' failed
>> -----------snap-------------
>>
>> src/pluginexport.h seems missing?
>>
> 
> Oops, I had this file ignored locally for some reason. I squashed it
> into the correct commit and force pushed it. It should be OK now.

Thanks, it builds fine now.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
diff --git a/wscript b/wscript
index 5f569e2..0b21d36 100644
--- a/wscript
+++ b/wscript
@@ -131,7 +131,7 @@ geany_sources = set([
     'src/editor.c', 'src/encodings.c', 'src/filetypes.c', 'src/geanyentryaction.c',
     'src/geanymenubuttonaction.c', 'src/geanyobject.c', 'src/geanywraplabel.c',
     'src/highlighting.c', 'src/keybindings.c',
-    'src/keyfile.c', 'src/log.c', 'src/main.c', 'src/msgwindow.c', 'src/navqueue.c', 'src/notebook.c',
+    'src/keyfile.c', 'src/log.c', 'src/libmain.c', 'src/msgwindow.c', 'src/navqueue.c', 'src/notebook.c',
     'src/plugins.c', 'src/pluginutils.c', 'src/prefix.c', 'src/prefs.c', 'src/printing.c', 'src/project.c',
     'src/sciwrappers.c', 'src/search.c', 'src/socket.c', 'src/stash.c',
     'src/symbols.c',
@@ -377,6 +377,7 @@ def build(bld):
             defines                 = 'G_LOG_DOMAIN="%s"' % plugin_name,
             target                  = plugin_name,
             uselib                  = ['GTK', 'GLIB', 'GMODULE'] + uselib_add,
+            use                     = ['geany'],
             install_path            = instpath)
 
     # CTags
@@ -431,23 +432,28 @@ def build(bld):
         geany_sources.add('src/win32.c')
         geany_sources.add('geany_private.rc')
 
+    base_uselibs = ['GTK', 'GLIB', 'GMODULE', 'GIO', 'GTHREAD', 'WIN32', 'SUNOS_SOCKET', 'M']
+    # libgeany
     bld(
-        features        = ['c', 'cxx', 'cprogram'],
+        features        = ['c', 'cxx', 'cshlib'],
         name            = 'geany',
         target          = 'geany',
         source          = geany_sources,
         includes        = ['.', 'scintilla/include', 'tagmanager/src'],
         defines         = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'],
-        uselib          = ['GTK', 'GLIB', 'GMODULE', 'GIO', 'GTHREAD', 'WIN32', 'SUNOS_SOCKET', 'M'],
+        uselib          = base_uselibs,
         use             = ['scintilla', 'ctags', 'tagmanager', 'mio'])
 
-    # geanyfunctions.h
+    # geany executable
     bld(
-        source  = ['plugins/genapi.py', 'src/plugins.c'],
-        name    = 'geanyfunctions.h',
-        before  = ['c', 'cxx'],
-        cwd     = '%s/plugins' % bld.path.abspath(),
-        rule    = '%s genapi.py -q' % sys.executable)
+        features        = ['c', 'cxx', 'cprogram'],
+        name            = 'geany_bin',
+        target          = 'geany',
+        source          = ['src/main.c'],
+        includes        = ['.', 'scintilla/include', 'tagmanager/src'],
+        defines         = ['G_LOG_DOMAIN="Geany"', 'GEANY_PRIVATE'],
+        uselib          = base_uselibs,
+        use             = ['geany'])
 
     # Plugins
     if bld.env['HAVE_PLUGINS'] == 1:

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to