GNU Make项目管理(第三版)

最新书摘:
  • Mochou
    2011-08-31
    $(player) $(libraries) : $(MAKE) --directory=$@
  • Mochou
    2011-08-31
    # COMSPEC is defined only on Windows.ifdef COMSPEC PATH_SEP := ; EXE_EXT := .exeelse PATH_SEP := : EXE_EXT :=endif
  • Mochou
    2011-08-31
    gui.o: CPPFLAGS += -DUSE_NEW_MALLOC=1
  • Mochou
    2011-08-30
    $@ The filename representing the target.$% The filename element of an archive member specification. $< The filename of the first prerequisite. $? The names of all prerequisites that are newer than the target, separated by spaces.$^ The filenames of all the prerequisites, separated by spaces. This list has duplicate filenames removed. $+ Similar to $^, this is the names of all the prerequisites separated by spaces, except that $+ includes duplicates. This variable was created for specific situations such as arguments to linkers where duplicate values have meaning. $*The stem of the target filename. A stem is typically a filename without its suffix.
  • Mochou
    2011-08-30
    ... a standard first target in many makefiles is called all. Targets that do not represent files are known as phony targets. Another standard phony target is clean. clean: rm -f *.o lexer.c make cannot distinguish between a file target and phony target.
  • Mochou
    2011-08-26
    ... the order in which commands are executed by make are nearly the opposite to the order they occur in the makefile. This top-down style is common in makefiles. Usually the most general form of target is specified first in the makefile and the details are left for later.
  • Mochou
    2011-08-26
    The first rule seen by make is used as default rule. A rule consists of three parts: the target, the prerequisites, and the commands to perform.The target is the file or thing that must be made. The prerequisites or dependents are those files that must exist before the target can be successfully created. And the commands are those shell commands that will create the target from the prerequisites.foo.o: foo.c foo.hgcc -c foo.c