From: W. Trevor King Date: Mon, 14 Jan 2013 18:05:28 +0000 (-0500) Subject: Makefile: Link to pattern rule documentation X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84ceed63bcfc7f16ea11d32242836a1773cf7d7a;p=assignment-template.git Makefile: Link to pattern rule documentation And call them "pattern rules" not "matching rules". --- diff --git a/Makefile b/Makefile index 2316c1d..b8b7787 100644 --- a/Makefile +++ b/Makefile @@ -135,10 +135,13 @@ $(CXX_PROGRAMS): % : $$($$(*)_OBJECTS) run: $(PROGRAMS) ./$(RUN_PROGRAM) -# Matching rule for compiling object files from C++ source +# Pattern rule for compiling object files from C++ source # There is an implicit rule for this in GNU make # http://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html -# but I redefine it here for clarity. +# but I redefine it here for clarity. For an explanation of the +# %.o: %.cpp +# syntax, see +# http://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html # # CXX and CXXFLAGS have defaults defined by make # http://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html @@ -149,7 +152,7 @@ run: $(PROGRAMS) %.o: %.cpp $(CXX) $(CXXFLAGS) -c $< -# Matching rule for compiling object files from C source +# Pattern rule for compiling object files from C source # The comments from the C++ rule above also apply here %.o: %.c $(CC) $(CFLAGS) -c $<