On 2008-11-03 13:46Z, Stephan Beal wrote: > > i know we've discussed the topic of "how to check if the user is > running Make version XYZ or higher" before, but i just had another > idea for helping to solve this...
What's wrong with the solutions already discussed? If you don't want to write the test in a makefile, then run `make --version` and parse the output; you could write a wrapper script to do that. > Consider this common makefile header: > #!/usr/bin/make -f > # Requires GNU Make 3.80+! > default: all > > What if we could replace the first line with: > > #!/usr/bin/make -R=3.80 -f > > (i picked -R off the top of my head (for "Required version") - maybe > -R is already in use) To see that it is: make --help | grep '[-]R' > In this invokation, make would refuse to run if its version is less > than 3.80. If its an older make, it would probably puke on the unknown > -R flag and die anyway, so we're protected either way. How would you distinguish that mode of failure from other modes? _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
