Re: [Geany-Devel] Linkage-Cleanup Build System Breakage

2014-10-26 Thread Enrico Tröger
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.


> 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 :).


> 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?



> Is everyone OK if this PR was merged to master and we had to fix up some
> build system stuff? Alternatively, I could also add anyone for push
> rights on my geany fork or push it to a branch on main geany repo if we
> wanted to sort-out the integration issues before merging to the main
> master branch.

I don't mind which way to take.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Linkage-Cleanup Build System Breakage

2014-10-26 Thread Nick Treleaven

On 25/10/2014 19:37, Matthew Brush wrote:

I can probably fix-up the makefile.win32 files if nobody else will as
it's just plain GNU make and should be similar changes as the Autotools.


OK.


It will require a couple more *nix utilities, namely `sed`, `sort`, and
`uniq` (or a `sort` that supports the `-u` option). A quick search finds
sed[1] and coreutils[2] which contains `sort` (probably with -u option)
and `uniq`. I assume MSYS also includes these common utils.


I suppose that's OK. The doc target already needs sed, but building the 
docs is optional. We might want to either require MSYS to build on 
Windows (currently it's an option), or otherwise update the website 
instructions about how to install the other utilities.

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


Re: [Geany-Devel] Linkage-Cleanup Build System Breakage

2014-10-26 Thread Matthew Brush

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.




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?





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.


Cheers,
Matthew Brush

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


Re: [Geany-Devel] Linkage-Cleanup Build System Breakage

2014-10-26 Thread Enrico Tröger
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:


signature.asc
Description: OpenPGP digital signature
___

Re: [Geany-Devel] Linkage-Cleanup Build System Breakage

2014-10-26 Thread Matthew Brush

On 14-10-26 04:16 PM, Enrico Tröger wrote:

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.


In Autotools libtool versions is not used yet anyway. It's just set to 
0:0:0 same as the defaults. I just added that for future use.



As said, the rest will take some time.



OK.




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.



This is good news. I have done work on Win32/MSYS Autotools but I didn't 
want to break this special path which is same/similar I needed. Some day 
I will push some changes to consolidate both branches in Makefile.ams 
and having a working Win32/MSYS Autotools :)


Cheers,
Matthew Brush
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel