Hello, everyone. I am attempting to learn GNU Make, and I am indebted to those who provide advice. Thanks in advance.
I am reading "Managing Projects with GNU Make" 3rd edition, page 29. It gives an example of a recipe for a "help" target. The book is 12 years old and my OS X installation is 11 years old. I have attempted to make this recipe and I am getting strange errors. I submit my terminal's output with, I hope, all necessary information. I don't understand awk and it is not my intention to learn more about that tool right now. Since I intend to learn more about make, what can I learn from this terminal output? Richard
Richards-MacBook-Pro:test2 richard$ cat makefile .PHONY: help help: $(MAKE) --print-data-base --question | \ awk '/^[^.%][-A-Za-z0-9_]*:/ \ { print substr($$1, 1, length($$1)-1) }' | \ sort # My version of GNU make (3.8.1) doesn't have builtin variables $(AWK) and # $(SORT), but awk and sort do exist on my system # I have omitted the pr command because my system (OS X 10.7) # doesn't understand one of the options given .PHONY: test test: @echo "This is a test" Richards-MacBook-Pro:test2 richard$ make help make --print-data-base --question | \ awk '/^[^.%][-A-Za-z0-9_]*:/ \ { print substr($1, 1, length($1)-1) }' | \ sort /bin/sh: fork: Resource temporarily unavailable make[55]: *** [help] Error 128 help makefile test Richards-MacBook-Pro:test2 richard$ make test This is a test Richards-MacBook-Pro:test2 richard$ make --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i386-apple-darwin11.3.0 Richards-MacBook-Pro:test2 richard$ awk --version awk version 20070501 Richards-MacBook-Pro:test2 richard$ make --print-data-base -n | grep AWK /bin/sh: fork: Resource temporarily unavailable make[54]: *** [help] Error 128 /bin/sh: fork: Resource temporarily unavailable make[57]: *** [help] Error 128 Richards-MacBook-Pro:test2 richard$ make --print-data-base -n | grep SORT /bin/sh: fork: Resource temporarily unavailable make[54]: *** [help] Error 128 Richards-MacBook-Pro:test2 richard$ /bin/sh: fork: Resource temporarily unavailable make[109]: *** [help] Error 128 /bin/sh: fork: Resource temporarily unavailable make[164]: *** [help] Error 128 /bin/sh: fork: Resource temporarily unavailable make[165]: *** [help] Error 128 Richards-MacBook-Pro:test2 richard$ uname -a Darwin Richards-MacBook-Pro.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:26:45 PDT 2012; root:xnu-1699.32.7~1/RELEASE_I386 i386
_______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make