Re: looking for a good example of non-recursive Make using project
NightStrike writes: > If you include src/more/Makefile.am into src/Makefile.am (a perfectly > valid thing to do), you will be unpleasantly surprised that > src/more/Makefile.am has to actually know where it is in the source > tree. It needs lines like this: > > prog_SOURCES += more/file3.c more/file4.c > > and **NOT** this: > > prog_SOURCES += file3.c file4.c > > It's really annoying. It means that renaming a directory is reaaly hard. Yeah, it would be nice if automake had some sort of mechanism to allow more natural names in files included from subdirs... What that mechanism would be, though, I have no idea. Typically when I've done this, I've used the variable idea mentioned by Eric to at least make it less annoying, but it's still ugly and kind of a pain... [e.g. s = my/dir blah_OINK = ${s}/file1.cc ${s}/file2.cc ... ] -miles -- Selfish, adj. Devoid of consideration for the selfishness of others.
Re: looking for a good example of non-recursive Make using project
On Tue, Nov 20, 2012 at 5:25 AM, Bob Friesenhahn wrote: > On Tue, 20 Nov 2012, Peter Johansson wrote: >> >> Makefile.am [in topdir]. For those fragment files, it would probably be >> confusing if paths were inserted into variables. Perhaps one could have a >> switch to turn that feature on. > > > Yes, it would be good to have a syntax which tells Automake to perform path > substitutions based on the relative path of the Makefile include fragment. > Otherwise Automake would operate as it does now. This syntax would allow > subdirectories to be moved around without needing the modify the Makefile > include fragments. Existing recursive per-subdirectory Makefile.am files > should be easily updateable to work with a non-recursive build. In fact, it > may be that the updated per-subdirectory Makefile.am files could still be > used to support a recursive configuration depending on how they are used. > > I believe that I proposed a syntax on this list in late 2003 or early 2004. > Perhaps my posting can be found in a mail archive somewhere. Can you add this feature to automake?
Re: looking for a good example of non-recursive Make using project
On Tue, 20 Nov 2012, Peter Johansson wrote: Makefile.am [in topdir]. For those fragment files, it would probably be confusing if paths were inserted into variables. Perhaps one could have a switch to turn that feature on. Yes, it would be good to have a syntax which tells Automake to perform path substitutions based on the relative path of the Makefile include fragment. Otherwise Automake would operate as it does now. This syntax would allow subdirectories to be moved around without needing the modify the Makefile include fragments. Existing recursive per-subdirectory Makefile.am files should be easily updateable to work with a non-recursive build. In fact, it may be that the updated per-subdirectory Makefile.am files could still be used to support a recursive configuration depending on how they are used. I believe that I proposed a syntax on this list in late 2003 or early 2004. Perhaps my posting can be found in a mail archive somewhere. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: looking for a good example of non-recursive Make using project
On 11/20/12 7:16 AM, Bob Friesenhahn wrote: A good paradigm for non-recursive make is to put Automake include fragments into each directory which support the files in that directory. The top Automake.am then includes these fragments. It would be useful if there was a syntax whereby the necessary subdirectory paths could be automatically inserted into Makefile variables and file paths based on the location of the Automake include file. That sounds like a good idea. That's exactly the setup I've ended up when changing from recursive to non-recursive Makefile. I also, however, often have Automake fragments in a directory 'am/' which are included into Makefile.am [in topdir]. For those fragment files, it would probably be confusing if paths were inserted into variables. Perhaps one could have a switch to turn that feature on. Cheers, Peter -- Peter Johansson
Re: looking for a good example of non-recursive Make using project
On Mon, 19 Nov 2012, Eric Blake wrote: You can reduce the pain by using variables: more = more prog_SOURCES += ${more}/file3.c ${more}/file4.c so that a rename now only has to touch the 'more =' line, rather than every use. The most serious problem is this incantation for 'prog' output to subdirectory 'foo/bar': foo_bar_prog_SOURCES += foo/bar/file3.c foo/bar/file4.c Note that the make variable name needs to include a representation of the path components. A good paradigm for non-recursive make is to put Automake include fragments into each directory which support the files in that directory. The top Automake.am then includes these fragments. It would be useful if there was a syntax whereby the necessary subdirectory paths could be automatically inserted into Makefile variables and file paths based on the location of the Automake include file. Since Makefile.in is produced by Perl, it should be possible to support this path simplification while still building a working makefile which emulates a heirarchical build style. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: looking for a good example of non-recursive Make using project
On 11/19/2012 12:51 AM, NightStrike wrote: > If you include src/more/Makefile.am into src/Makefile.am (a perfectly > valid thing to do), you will be unpleasantly surprised that > src/more/Makefile.am has to actually know where it is in the source > tree. It needs lines like this: > > prog_SOURCES += more/file3.c more/file4.c > > and **NOT** this: > > prog_SOURCES += file3.c file4.c > > > It's really annoying. It means that renaming a directory is reaaly hard. You can reduce the pain by using variables: more = more prog_SOURCES += ${more}/file3.c ${more}/file4.c so that a rename now only has to touch the 'more =' line, rather than every use. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature
Re: looking for a good example of non-recursive Make using project
On Sun, 18 Nov 2012, NightStrike wrote: If you include src/more/Makefile.am into src/Makefile.am (a perfectly valid thing to do), you will be unpleasantly surprised that src/more/Makefile.am has to actually know where it is in the source tree. It needs lines like this: This is something I complained about long ago. It is the main impediment to creating a non-recursive Automake project. It is something that Automake could have easily fixed given that it writes the template makefiles using Perl and can easily perform path substitutions. I don't understand why there was resistance (or profound lack of interest) in fixing this at the time. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Fwd: looking for a good example of non-recursive Make using project
and reply to the list too... -- Forwarded message -- From: Vincent Torri Date: Sat, Nov 17, 2012 at 1:53 PM Subject: Re: looking for a good example of non-recursive Make using project To: Václav Zeman On Sat, Nov 17, 2012 at 1:35 PM, Václav Zeman wrote: > On 11/17/2012 11:36 AM, Vincent Torri wrote: >> On Sat, Nov 17, 2012 at 11:13 AM, Václav Zeman wrote: >>> Hi. >>> >>> I am looking for a good example of a project with non-recursive Make >>> that is using Automake, that is not trivial. I would like to convert my >>> project, log4cplus, to non-recursive Make style, if it is possible. Any >>> recommendations? >>> >>> -- >>> VZ >>> >> >> I don't know if it's a good example or not, but it's non trivial and >> is using non-recusrvice build. >> >> As it builds several libraries and binaries, I have separated them in >> several files that I have called Makefile_Foo.am (they are just >> included and not managed by automake directly) > Maybe I am getting blind or you have forgotten to actually mention what > is the example. :) sorry : http://trac.enlightenment.org/e/browser/trunk/efl/src/Makefile.am Vincent Torri
Re: looking for a good example of non-recursive Make using project
On Sat, Nov 17, 2012 at 12:13 AM, Václav Zeman wrote: > Hi. > > I am looking for a good example of a project with non-recursive Make > that is using Automake, that is not trivial. I would like to convert my > project, log4cplus, to non-recursive Make style, if it is possible. Any > recommendations? http://mingw-w64.sf.net Specifically, the mingw-w64-crt sub project. It's completely non-recursive. The only thing you really have to watch out for with non-recursive automake is that all source file references have to be from the top of your source directory. For instance, say you have this: src/Makefile.am src/file1.c src/file2.c src/more/Makefile.am src/more/file3.c src/more/file4.c If you include src/more/Makefile.am into src/Makefile.am (a perfectly valid thing to do), you will be unpleasantly surprised that src/more/Makefile.am has to actually know where it is in the source tree. It needs lines like this: prog_SOURCES += more/file3.c more/file4.c and **NOT** this: prog_SOURCES += file3.c file4.c It's really annoying. It means that renaming a directory is reaaly hard.
Re: looking for a good example of non-recursive Make using project
On Sat, 17 Nov 2012, Václav Zeman wrote: Hi. I am looking for a good example of a project with non-recursive Make that is using Automake, that is not trivial. I would like to convert my project, log4cplus, to non-recursive Make style, if it is possible. Any recommendations? I am not sure if it is a "good" example (might not use official recommended practices) but GraphicsMagick (~300K lines of code) has been using non-recursive make since not long after Automake supported it. Parallel build is shown to scale very well on multi-core systems (tested on up to 64 cores). I am observing 86% per-core scalability for fully optimized (-O2) debuggable (-g -g3 -ggdb) builds, with the linker being the main limiter of scalability. Make sure to avoid any directory recursion and avoid use of things like libtool convenience libraries. Try to simplify the dependency chain so as many files may be compiled at once as possible. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: looking for a good example of non-recursive Make using project
On 11/17/2012 11:36 AM, Vincent Torri wrote: > On Sat, Nov 17, 2012 at 11:13 AM, Václav Zeman wrote: >> Hi. >> >> I am looking for a good example of a project with non-recursive Make >> that is using Automake, that is not trivial. I would like to convert my >> project, log4cplus, to non-recursive Make style, if it is possible. Any >> recommendations? >> >> -- >> VZ >> > > I don't know if it's a good example or not, but it's non trivial and > is using non-recusrvice build. > > As it builds several libraries and binaries, I have separated them in > several files that I have called Makefile_Foo.am (they are just > included and not managed by automake directly) Maybe I am getting blind or you have forgotten to actually mention what is the example. :) -- VZ signature.asc Description: OpenPGP digital signature
Re: looking for a good example of non-recursive Make using project
On 11/17/2012 11:13 AM, Václav Zeman wrote: > Hi. > > I am looking for a good example of a project with non-recursive Make > that is using Automake, that is not trivial. I would like to convert my > project, log4cplus, to non-recursive Make style, if it is possible. Any > recommendations? > GNU Coreutils has been recently converted to a non-recursive make setup. You might take a look there for initial "inspiration", and get back here once you have pinpointed more precise problems and/or doubts. In your case (looking at the current SVN trunk of your project), a good first step might be de-recursivize the 'tests/' and 'include/' directories. HTH, Stefano
Re: looking for a good example of non-recursive Make using project
On Sat, Nov 17, 2012 at 11:13 AM, Václav Zeman wrote: > Hi. > > I am looking for a good example of a project with non-recursive Make > that is using Automake, that is not trivial. I would like to convert my > project, log4cplus, to non-recursive Make style, if it is possible. Any > recommendations? > > -- > VZ > I don't know if it's a good example or not, but it's non trivial and is using non-recusrvice build. As it builds several libraries and binaries, I have separated them in several files that I have called Makefile_Foo.am (they are just included and not managed by automake directly) Hth Vincent Torri
looking for a good example of non-recursive Make using project
Hi. I am looking for a good example of a project with non-recursive Make that is using Automake, that is not trivial. I would like to convert my project, log4cplus, to non-recursive Make style, if it is possible. Any recommendations? -- VZ signature.asc Description: OpenPGP digital signature