On 2010.05.17 3:24, Glenn Morris wrote:
$(foo): @echo fooMy question is, if foo is empty, ie: foo = which means that the $(foo) rule has no target (?), is the resulting Makefile valid and portable? It seems to work OK with GNU make, but I am not sure if I can rely on that.
From info make: A "target" is usually the name of a file that is generated by a program; examples of targets are executable or object files. A target can also be the name of an action to carry out, such as `clean'. So if strlen > 0 - it OK, otherwise GNU Make developer nothing guarantee. If you run make with empty string target you get error: $ LANG=C make "" make: *** empty string invalid as file name. Stop. It likely empty string target incorrect and you must rewrote build scripts to avoid empty string in target. -- С уважением, Александр Гавенко. _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
