|
|
Home » Community » Coffee corner » The power of Makefile
|
|
Re: The power of Makefile [message #25937 is a reply to message #25915] |
Sat, 20 March 2010 22:48   |
|
Reini wrote on Fri, 19 March 2010 17:53 | Hello Guys,
I would like to give some Feedback about the Makefile from OSX.
There is a parsing error in the script on my machine.
sh-3.2# make -f Makefile PKG=ide "FLAGS=GUI SSE2 MT SPEED" FAST=n BIN=bin EXPORT=Makefile.ide
Parsing package ide ...
sed: 2: "1h;1!H;${ g;s/;[\t \x0A ...": RE error: parentheses not balanced
Preparing output directory structure ...
usage: mkdir [-pv] [-m mode] directory ...
make: *** [prep-dirs] Error 64
My personal opinion is to move away from this complicated oldschool make stuff to premake build system since its also very small and much more easier to maintain !
Greeting Reinhold
|
Hi Reini,
Thank you very much for feedback. I'll have a look at it soon. Looks like it is just different syntax of mkdir on mac... I don't have any mac around, so I'll probably contact you soon via PM for frther testing, hope you don't mind that
It is not very complicated, and since it was never tested on mac (just linux and BSD), it doesn't even surprise me, that there is a problem... And do you really think premake/cmake/scons etc. are any simpler? 
Regards,
Honza
|
|
|
|
|
|
Re: The power of Makefile [message #25987 is a reply to message #24947] |
Tue, 23 March 2010 12:10   |
|
Hi,
The summary from Matthias is very accurate. I would like to just add that the initial idea was to get theide-like possibilities even on systems where theide is not installed, mainly to make export and distribution of apps easier.
Reini, no one is going to stop you if you try implement this with premake or any other build system. Actually opposite is true - the more possibilities we offer, the more users should be happy because they find something the are familiar with.
BTW: There was attempt to use cmake to build u++ (by Sender Ghost), but AFAIK it was not succesful (yet) because of some problems with icpp files handling. Similar problems might arise with premake.
Best regards,
Honza
|
|
|
Universal Makefile [message #28331 is a reply to message #24947] |
Sat, 28 August 2010 00:30   |
|
Hi everyone,
Even though it might looked like the development of the beast I personally call universal Makefile have ceased, the opposite is truth. I gave it a major rewrite, keeping the same idea and mostly same syntax, but writing brand new internals, especially the parser.
So what is new: It supports a wider selection of systems, I took care especially to make sure it works on BSD (using gmake), and that should make it work on most other POSIX compliant systems too. Also it doesn't require bash now, plain sh will suffice (or ash, dash, etc.). Some changes also happened to the parallel building, it now uses the number of cpus as a number of threads by default. The output is IMHO prettier and more informative now. The internals are also written with maintainability in mind that should save me some hair pulling in future 
Anyone interested can find the new version in uppbox/lpbuild in svn or on-line here: http://code.google.com/p/upp-mirror/source/browse/trunk/uppb ox/lpbuild/Makefile
Best regards,
Honza
|
|
|
Re: Universal Makefile [message #28332 is a reply to message #28331] |
Sat, 28 August 2010 09:22   |
chickenk
Messages: 171 Registered: May 2007 Location: Grenoble, France
|
Experienced Member |
|
|
Awesome.
A small bug: I'd like to use the "export" feature, using that syntax (my locale is fr_FR.UTF-8):
$ make -f uppbox/lpbuild/Makefile PKG=ide FLAGS="GUI MT" export
Exporting uppbox/lpbuild/Makefile to Makefile.export ...
make[1]: [ide] Erreur 1 (ignorée)
$ cat Makefile.export
.PHONY:default
default: all
$
What? That's all? Seems it's missing some content. Next I try to use the C locale:
$ export LC_ALL=C
$ make -f uppbox/lpbuild/Makefile PKG=ide FLAGS="GUI MT" export
Exporting uppbox/lpbuild/Makefile to Makefile.export ...
make[1]: [ide] Error 1 (ignored)
$ cat Makefile.export
[whole content, so it works]
So I suggest the subprocesses are executed with the locale set to C, so that words parsing later works.
UPDATE: I also changed one line for more precise output, so that you understand why yours may differ: line 337, I changed $(call echo," Exporting makefile to $(EXPORT) ...") to $(call echo," Exporting $(filename) to $(EXPORT) ...")
regards,
Lionel
[Updated on: Sat, 28 August 2010 09:26] Report message to a moderator
|
|
|
Re: Universal Makefile [message #28405 is a reply to message #28332] |
Tue, 31 August 2010 19:37   |
|
Hi Lionel,
It took bit longer than I expected, I found few more bugs in the process of fixing this one And the problem actually was not related to the locale, at least I think...
Here I post fixed version, please let me know if it works better.
Best regards,
Honza
-
Attachment: Makefile
(Size: 23.35KB, Downloaded 437 times)
|
|
|
|
Re: Universal Makefile [message #29915 is a reply to message #29913] |
Mon, 29 November 2010 21:31   |
|
masu wrote on Mon, 29 November 2010 20:57 | One thing I observed is that with every make call *.cpp files are always recompiled even if there exists an object file with a newer time stamp.
|
Oops, looks like I broke something It is of course supposed to rebuild only when the source has newer timestamp. I'll look into it...
Thanks for testing, Matthias!
Honza
|
|
|
Re: Universal Makefile [message #29917 is a reply to message #29915] |
Mon, 29 November 2010 23:33  |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
Honza, sorry, but another thing:
Flags in *.upp files labeled "BSD" are not taken into account on BSD systems. BSD variants have these flags in common.
Regards,
Matthias
|
|
|
Goto Forum:
Current Time: Wed Apr 30 07:50:49 CEST 2025
Total time taken to generate the page: 0.00995 seconds
|
|
|