Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Would a linux config script help with builds?

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

User avatar
beeze
Competent
Competent
Posts: 59
Joined: Sun Nov 02, 2008 12:49 pm
Location: Worthing (West Sussex) but currently in Melbourne, AUS

Re: Would a linux config script help with builds?

Post by beeze »

Simon B wrote:
Considering:
https://bb.oolite.space/viewtopic.php?t= ... adb6aea479

It struck me that much of the work needed to make sure of a compatible build environment for different gnu/linux distros would normally go in a configure script - then the install method would become -

1. get the source
2. cd into top directory
3. ./configure
4. make
5. make install

[snipped]

What say ye?
I'm entering the fray here :P

The above is exactly what is needed (IMO)

. The ./configure script should check deps and know the architecture and if all OK, creates the makesfiles
. The root makefile calls any child makefiles and controls the build.
. The 'make install' should create the necessary directories (if they don't exist) and copy any resultant binaries to (say) /usr/local/bin

I'm happy to get involved in this area, but if someone's already doing it, I will back off. No point in re-inventing the wheel, eh? ;)

Beeze/
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Just remember that a default checkout of the trunk has to build under Windows as well.. so any replacement of the current build system needs to take building under Windows into account.
The glass is twice as big as it needs to be.
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Post by Simon B »

That's actually not a problem - the configure script is a linux-ism, and irrelevent to widows. When run it modifies the makefile and any others in preperation for the main event. The unmodified versions build under windows.

For many projects, the configure step actually creates the makefiles that get used.

If you want to see an example of heavy configure use, have a look at vulture's eye - which also builds under windows.

Then, of course, there is the obligatory "upgrade to linux - feel the freedom" message. I'm afraid it's a law... ;)
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Sorry, I was running under the impression you wanted to replace the current Makefiles, not offer an alternative.

As it's a multi-platform project it would be nice to maintain similar build experiences for all (with the exception of Mac which seems to be 'special' *g*)

I'm currently looking at re-working the makefiles with a top-level makefile. This will mostly be just a wrapper around existing stuff, but I figure it'll be an easier starting-off point for people with targets such as 'debug', 'release', 'pkg-deb', 'pkg-win' and so on. (Open for suggestions on standardised target names)

It will build 'standard' debug and release builds, Ubuntu (Debian) packages, and the Windows installer. Shouldn't be hard to integrate configure/make for the 'standard' builds into this framework.

Another thing to keep in mind is that different audiences use this for different purposes:
* Developers
* Package maintainers
* End-users of systems for which there are no explicit packages available

So unfortunately there's no 'one build for all' magic bullet.
The glass is twice as big as it needs to be.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Simon B wrote:
Then, of course, there is the obligatory "upgrade to linux - feel the freedom" message. I'm afraid it's a law... ;)
Preaching to the (long) converted.. been running Linux for well over 10 years.
The glass is twice as big as it needs to be.
Post Reply