Jonathan Robie escribió:
Manuel Teira Paz wrote:
Hello, Jonathan.
I made that change, if I remember correctly. Previously, the makefile in any of the examples directories was made by hand, and intended to be human-readable, to be deployed as part of the examples. Unfortunately, this way, the makefile was not in sync with the autotools world, and, for example, the compiler to be used, flags, library locations, were hardwired into the makefile to some extent. What we have now, as you said, is a autotools-generated makefile, to compile the examples in the build directory, and another one to be deployed (human-friendly) that also has to be capable of generating the examples, but using the installed distribution.

I am not advocating going back to the hand-written makefiles for the examples.

The human-friendly one in ./liibs is generated by a target in the Makefile in the given example dirctory, and changes people make when doing other things can break it. I like the fact that we have a readable makefile that is generated, but when people break it, I want them to notice. We had to fix it twice this last week.

A couple of possible approaches:

1. Let the current examples Makefile generate the ./libs Makefile, then use it to compile the examples.
I found this one particulary complex, since you need to handle two build modes. For the autotools fashion, you'd rather use .la linkage files, and for the simpler, independent, user-friendly one, it seems to be better to link directly against the real libraries.
2. Add a goal to '$ make check' that creates a new directory with each example and Makefile and ensures that it still compiles.
I find this option more meaningful, since building the examples could be seen also as a check.
Can you think of other approaches that might be better?
I like your #2 approach.
--
Manuel.

Jonathan

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to