This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Require GNU make to build binutils-gdb


On 2016-11-17 15:42, Paul Smith wrote:
Regarding the patch linked to earlier, I wonder why multiple pattern
rules were added, rather than just using VPATH plus a few pattern rules
/ explicit rules for the special cases?

I didn't check carefully.

Are you talking about gdb/Makefile.in? Could you be more specific? I am not a Makefile expert, so if there's a better way to do what I did, I'd like to learn about it.

If you want to check for 3.81, you could look for the .FEATURES variable
instead of .VARIABLES; .FEATURES was introduced in 3.81 and is intended
to let your makefile query what features are available without worrying
about specific versions.

It's also never empty, if it exists.  It has one nice advantage in that
it's a static value, while .VARIABLES requires GNU make to create a list
of the names of all the variables.  But, if this check is done early
that's not such a big deal.

3.81 was released 10.5 years ago (Apr 2006).

Thanks for the tip. I found the original gcc patch that added the 3.80 checking code, it also mentions .FEATURES for checking for 3.81:

  https://gcc.gnu.org/ml/gcc-patches/2008-04/msg01018.html

automake, technically, generates POSIX compliant makefiles that don't
rely on GNU make features at all and should work with a wide range of
different make implementations.

At least, that's how it is unless something has changed since I looked
last.

I think you're right. Skimming the automake manual, I saw some mentions of tricks you could use if you assumed GNU make would be used. So in the best case, requiring GNU make unlocks some features we could not have used otherwise, and worst case it doesn't change anything.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]