Hi,
We use several different build systems and need the build system interface to be generalised somewhat. We use Jam, Waf, Scons make and others because we combine code from lots of sources. Although we can change the commands there are still some hard coded bits that cause problems, eg some builders don't have all targets so make all menu action confuses them and one product uses a pre-processor before the C++ compiler and it doesn't like the -o option so we can't use the compile menu item.
I am willing to have a hack at the changes (provided time and ability permit) but it seemed sensible to check what is in progress or others are doing.
The suggestions are:
1. make all the compile/link/build commands project specific, or from global settings if not defined for project 2. make all the commands entirely configurable, remove any magically included '-o' options for example 3. replace the build menu 'make all' and 'make target' with one 'build ->' with a submenu listing the available targets configurable from a dialog 4. have a set of global settings which make it work pretty much the same as it does now for make so as to not break existing stuff 5. (optional time permitting) have a set of templates which provide common setups and which can be selected at project creation
Any thoughts/suggestions before we start would be welcome.
Cheers Lex
Lex Trotman wrote:
Hi,
We use several different build systems and need the build system interface to be generalised somewhat. We use Jam, Waf, Scons make and others because we combine code from lots of sources. Although we can change the commands there are still some hard coded bits that cause problems, eg some builders don't have all targets so make all menu action confuses them and one product uses a pre-processor before the C++ compiler and it doesn't like the -o option so we can't use the compile menu item.
I am willing to have a hack at the changes (provided time and ability permit) but it seemed sensible to check what is in progress or others are doing.
The suggestions are:
- make all the compile/link/build commands project specific, or from
global settings if not defined for project 2. make all the commands entirely configurable, remove any magically included '-o' options for example 3. replace the build menu 'make all' and 'make target' with one 'build ->' with a submenu listing the available targets configurable from a dialog 4. have a set of global settings which make it work pretty much the same as it does now for make so as to not break existing stuff 5. (optional time permitting) have a set of templates which provide common setups and which can be selected at project creation
Any thoughts/suggestions before we start would be welcome.
Cheers Lex
Hi Lex - Although I'm very much a novice in the build area, I wonder if the "CMake" app has been considered? This is used by the KDE project (among others). It is apparently very powerful and flexible, but I can't really confirm that (having not used it myself). Just thought I'd mention it...... ;) - Andy
replace the build menu 'make all' and 'make target' with one 'build ->' with a submenu listing the available targets configurable from a dialog
That would be *very* useful, as it would mean I could integrate various code-analysis tools (e.g. PyLint, PyChecker, PyFlakes) and similar things.
On Thu, 2 Oct 2008 17:25:13 +1000, "Lex Trotman" elextr@gmail.com wrote:
Hi.
The suggestions are:
- make all the compile/link/build commands project specific, or from
global settings if not defined for project
- make all the commands entirely configurable, remove any magically
included '-o' options for example
There is no magically added '-o' anymore, this was removed between Geany 0.13 and Geany 0.14, i.e. about 6 or 7 months ago. The commands Compile, Build and Run are already entirely configurable. And there is 'Make Custom Target' to configure the make command.
- replace the build menu 'make all' and 'make target' with one
'build ->' with a submenu listing the available targets configurable from a dialog
I'm not sure we really need this. This makes it more complicated to find and reach these items in the menu, you have to navigate through an additional submenu.
- have a set of global settings which make it work pretty much the
same as it does now for make so as to not break existing stuff
- (optional time permitting) have a set of templates which provide
common setups and which can be selected at project creation
KISS!
In general, we tried to keep the Build system simple and easy to use. The more you can configure, the more complicated it gets to use and the more error-prone the code gets.
If you really need more power in the Build system, maybe it's worth to extend it using the plugin system, so Geany itself keeps its simple and easy to use build system and users with more advanced needs can you your plugin to get the power features :).
Regards, Enrico
On Thu, 2 Oct 2008 17:25:13 +1000 "Lex Trotman" elextr@gmail.com wrote:
Hi,
We use several different build systems and need the build system interface to be generalised somewhat. We use Jam, Waf, Scons make and others because we combine code from lots of sources. Although we can change the commands there are still some hard coded bits that cause problems, eg some builders don't have all targets so make all menu action confuses them and one product uses a pre-processor before the C++ compiler and it doesn't like the -o option so we can't use the compile menu item.
First, for non-trivial projects we suggest using Makefiles. The project 'Make in base path' setting with a master Makefile will work for building everything. It sounds like the main problem after that would be getting the Make Object command to work for folders with no Makefile.
I am willing to have a hack at the changes (provided time and ability permit) but it seemed sensible to check what is in progress or others are doing.
Sounds good, I think there is room for improvement in the build commands. But I think this will require a lot of discussion on this ML before we can agree on what should be done.
The suggestions are:
- make all the compile/link/build commands project specific, or from
global settings if not defined for project
Certainly project-specific make commands would be useful.
The compile & build commands are intended as simple commands. But maybe this is confusing to have these two different ways for building.
...
- replace the build menu 'make all' and 'make target' with one
'build ->' with a submenu listing the available targets configurable from a dialog
We don't want to replace an easy to find Make All item, but there is a similar item on the TODO list. There could be a list of recent custom targets remembered and shown in a submenu.
...
- (optional time permitting) have a set of templates which provide
common setups and which can be selected at project creation
This shouldn't be in the core of Geany. Configuring build commands is a useful and generic feature, but templates for building certain projects is not really part of the Geany philosophy. It could be done in a plugin though.
Regards, Nick
On Thu, 2 Oct 2008 17:35:28 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
The compile & build commands are intended as simple commands. But maybe this is confusing to have these two different ways for building.
This reminds me that I'm wondering already for a long time why I added these both commands. Because mainly 'Build' is sufficient. I guess there was a reason why I added both but I can't remember :). But well, this was about 3 years ago.
I think basically we could remove the Compile command. The distinction between compile and build is mainly only present in C and C++ and for quick testing not really necessary. Build should be enough. So we could remove the Compile command and replace it with Build, this would also avoid confusion about their difference.
But maybe we should delay this to post-0.15.
Regards, Enrico
On Thu, 2 Oct 2008 18:51:01 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 2 Oct 2008 17:35:28 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
The compile & build commands are intended as simple commands. But maybe this is confusing to have these two different ways for building.
This reminds me that I'm wondering already for a long time why I added these both commands. Because mainly 'Build' is sufficient. I guess there was a reason why I added both but I can't remember :). But well, this was about 3 years ago.
I think basically we could remove the Compile command. The distinction between compile and build is mainly only present in C and C++ and for quick testing not really necessary. Build should be enough. So we could remove the Compile command and replace it with Build, this would also avoid confusion about their difference.
I think it would be better have a number of commands the user can run. But I don't know how to make a custom label get translated (e.g. can it be translated from a filetypes.foo data file?).
It might upset people to lose a command because for e.g. Python people might use it to compile the file, checking for errors. Maybe the build command is less intuitive in that instance, or maybe the user wants the build command for something else.
One idea could be that compile, build, make, make object are all just a variable list of commands to run, so essentially the same to Geany. Some are related to the filetype, some could be global commands available whatever the filetype.
Regards, Nick
On Fri, 3 Oct 2008 15:14:19 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 2 Oct 2008 18:51:01 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 2 Oct 2008 17:35:28 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
The compile & build commands are intended as simple commands. But maybe this is confusing to have these two different ways for building.
This reminds me that I'm wondering already for a long time why I added these both commands. Because mainly 'Build' is sufficient. I guess there was a reason why I added both but I can't remember :). But well, this was about 3 years ago.
I think basically we could remove the Compile command. The distinction between compile and build is mainly only present in C and C++ and for quick testing not really necessary. Build should be enough. So we could remove the Compile command and replace it with Build, this would also avoid confusion about their difference.
I think it would be better have a number of commands the user can run. But I don't know how to make a custom label get translated (e.g. can it be translated from a filetypes.foo data file?).
No idea, maybe we could use intltool for this, similar to the way the .desktop gets translated but this has just to be tested.
It might upset people to lose a command because for e.g. Python people might use it to compile the file, checking for errors. Maybe the build command is less intuitive in that instance, or maybe the user wants the build command for something else.
Sorry, I wasn't clear on this. I didn't mean to remove the Compile command. Rather I meant to replace the Compile command of C-like filetypes (those which actually use Compile&Build) with the Build command and then drop the additional Build command, i.e. Compile for C-like filetypes does Build, Compile for other filetypes, like Python remains as it is.
One idea could be that compile, build, make, make object are all just a variable list of commands to run, so essentially the same to Geany. Some are related to the filetype, some could be global commands available whatever the filetype.
This would be even better, so if we make those commands more flexible, we don't need to discuss the above :).
Regards, Enrico
On Mon, Oct 6, 2008 at 11:51 PM, Enrico Tröger enrico.troeger@uvena.dewrote:
On Fri, 3 Oct 2008 15:14:19 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 2 Oct 2008 18:51:01 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 2 Oct 2008 17:35:28 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
The compile & build commands are intended as simple commands. But maybe this is confusing to have these two different ways for building.
This reminds me that I'm wondering already for a long time why I added these both commands. Because mainly 'Build' is sufficient. I guess there was a reason why I added both but I can't remember :). But well, this was about 3 years ago.
I think basically we could remove the Compile command. The distinction between compile and build is mainly only present in C and C++ and for quick testing not really necessary. Build should be enough. So we could remove the Compile command and replace it with Build, this would also avoid confusion about their difference.
I think it would be better have a number of commands the user can run. But I don't know how to make a custom label get translated (e.g. can it be translated from a filetypes.foo data file?).
No idea, maybe we could use intltool for this, similar to the way the .desktop gets translated but this has just to be tested.
It might upset people to lose a command because for e.g. Python people might use it to compile the file, checking for errors. Maybe the build command is less intuitive in that instance, or maybe the user wants the build command for something else.
Sorry, I wasn't clear on this. I didn't mean to remove the Compile command. Rather I meant to replace the Compile command of C-like filetypes (those which actually use Compile&Build) with the Build command and then drop the additional Build command, i.e. Compile for C-like filetypes does Build, Compile for other filetypes, like Python remains as it is.
One idea could be that compile, build, make, make object are all just a variable list of commands to run, so essentially the same to Geany. Some are related to the filetype, some could be global commands available whatever the filetype.
This would be even better, so if we make those commands more flexible, we don't need to discuss the above :).
These last two comments is essentially what I proposed, sorry it
accidentally didn't get onto this thread. There are a set of configurable commands some dependent on file and some dependent on project or global preferences if no project is in use.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany