|
|
Home » Developing U++ » U++ Developers corner » umk static version
|
|
|
Re: umk static version [message #53331 is a reply to message #53325] |
Sun, 29 March 2020 17:46   |
|
It works on freshly upgraded ArchLinux as well as on ancient Debian wheezy.
This is actually much better than anything I ever proposed I always tried to build using theide using single Makefile, but maintaining that Makefile was a nightmare. This provides simple way to build U++ sources (anything, not just TheIDE) using the same code as used by TheIDE itself.
All you need to do is to add "umks" to sources, probably together with simple makefile that takes care about creating .bm files and than run umks. Or possibly cleaner solution, not requiring to have binary file in source tarball: Just download the latest "umks" in the Makefile (or let user download it manually in case of offline install, but that is a rare use-case). Just thinking aloud here, but I really like the idea. It's IMHO a win-win, since it will make the builds faster for user and the distribution of sources will be simpler for you :)when
Best regards,
Honza
|
|
|
|
|
|
|
Re: umk static version [message #53351 is a reply to message #53325] |
Mon, 30 March 2020 13:24   |
 |
amrein
Messages: 278 Registered: August 2008 Location: France
|
Experienced Member |
|
|
A static umk binary in a source package is not a good idea in my opinion.
There is no need for this.
Proof:
Now that upp use pkg-config, you can run this command in linux and bsd and build theide out of the box:
make -C uppsrc -f Makefile.in -j8
The build scripts in the root directory (Makefile, domake, doinstall, ...) are mainly there to ease the build process + the install process + to handle variants like MacOS X for example or missing gcc compiler or too old compiler version, ...
[Updated on: Mon, 30 March 2020 13:53] Report message to a moderator
|
|
|
|
Re: umk static version [message #53355 is a reply to message #53325] |
Mon, 30 March 2020 15:33   |
|
I agree with amrein, that it would not be good idea to put it in the source package.
However, it is not entirely true that this is not needed. Currently, only theide can be build from theide using the pre-generated Makefile.in. With umks, the process is much more universal. You could build umk, or any of the examples, just by passing different arguments to make.
Also, if done properly, it would make it much easier for anyone to distribute their own U++ packages in source form. You'd just put uppsrc, your application sources and universal makefile (using umks) into tarball and you have source package built in an instant with little to no work.
I'm really tempted to write an example Makefile just to show you how easy it would be to build anything 
Honza
|
|
|
|
|
|
Re: umk static version [message #53360 is a reply to message #53357] |
Mon, 30 March 2020 21:52   |
|
mirek wrote on Mon, 30 March 2020 16:30To make it more fun, umks is now uploaded to downloads... 
Great I just fixed the Makefile in the original post so it actually works.
By the way: One thing I'd definitely change about umk is the "UI". Fixed position parameters, no real help, some params prefixed with '-', some with '+', no long options... Explaining this to a common user would be nightmare Isn't it time to tweak this a little as well? I'd be willing to do the work. I know it's not hard, but I guess you have more important things to do, right? 
Honza
|
|
|
Re: umk static version [message #53362 is a reply to message #53360] |
Mon, 30 March 2020 22:33   |
 |
amrein
Messages: 278 Registered: August 2008 Location: France
|
Experienced Member |
|
|
The current build system can generate umk binary alone (make umk -j8).
Then theide could be build using umk to speed the process.
It know that this works on Linux because I tested a modified "domake" script doing just this in February 2017 (still on my computer). I didn't investigate further for other OS.
My main issue was: umk uses $HOME/umk/_out . This is incompatible with rpm based distro (and sandboxed compilation as on Debian I think).
edit: and now umk or umks create ~/.upp/umk/... ~/.upp/umks/... and this is still incompatible with binary package building in most Linux distributions.
[Updated on: Mon, 30 March 2020 22:39] Report message to a moderator
|
|
|
Re: umk static version [message #53363 is a reply to message #53360] |
Mon, 30 March 2020 23:28   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
dolik.rce wrote on Mon, 30 March 2020 21:52mirek wrote on Mon, 30 March 2020 16:30To make it more fun, umks is now uploaded to downloads... 
Great I just fixed the Makefile in the original post so it actually works.
By the way: One thing I'd definitely change about umk is the "UI". Fixed position parameters, no real help, some params prefixed with '-', some with '+', no long options... Explaining this to a common user would be nightmare Isn't it time to tweak this a little as well? I'd be willing to do the work. I know it's not hard, but I guess you have more important things to do, right? 
Honza
'+' prefixes flags, which I think is not that bad.
I any case it would be good to show how do you want to change it before implementing...
Mirek
|
|
|
|
Re: umk static version [message #53366 is a reply to message #53365] |
Tue, 31 March 2020 12:52   |
 |
amrein
Messages: 278 Registered: August 2008 Location: France
|
Experienced Member |
|
|
mirek wrote on Tue, 31 March 2020 11:58amrein wrote on Mon, 30 March 2020 22:33The current build system can generate umk binary alone (make umk -j8).
Then theide could be build using umk to speed the process.
It know that this works on Linux because I tested a modified "domake" script doing just this in February 2017 (still on my computer). I didn't investigate further for other OS.
My main issue was: umk uses $HOME/umk/_out . This is incompatible with rpm based distro (and sandboxed compilation as on Debian I think).
edit: and now umk or umks create ~/.upp/umk/... ~/.upp/umks/... and this is still incompatible with binary package building in most Linux distributions.
I believe that the output dir can be specified as the last optional parameter...
It never worked for me:
tar zxf upp-x11-src-14204.tar.gz
cd upp-x11-src-14204
make -j8 umk
./umk uppsrc ide GCC myoutdir
this will still create $HOME/.upp/umk/_out/ and the last umk parameter won't be use.
The out parameter works only for the -x -X -M -Mx -mX options = exporting files necessary to build the project or exporting a Makefile.
[Updated on: Tue, 31 March 2020 12:53] Report message to a moderator
|
|
|
Re: umk static version [message #53372 is a reply to message #53325] |
Tue, 31 March 2020 15:25   |
|
The problem with using $HOME can be easily circumvented, just tell umk to use different one:
mkdir build
HOME="$PWD/build" ./umks "examples,reference,uppsrc" "ide" ./GCC.bm "-rbv" "+GUI,MT" "./theide"
But it's true, that this could be simpler.
|
|
|
Goto Forum:
Current Time: Sat Apr 26 05:49:08 CEST 2025
Total time taken to generate the page: 0.00991 seconds
|
|
|