diff --git a/clang.md b/clang.md index 0dd735519d858a133ad9b49caaf46968a5b9296d..add2a11099e31f49c007d4f0f6d74fe1b547a870 100644 --- a/clang.md +++ b/clang.md @@ -699,26 +699,23 @@ These are the variables that allow you to refer to the same name defined in `tar hello: p1 p2 # Outputs "hello", since this is the target name echo $@ - # Outputs all prerequisites newer than the target echo $? - # Outputs all prerequisites echo $^ - - # Outputs the first prerequisite - echo $< - - touch hello + # Outputs the first prerequisite + echo $< + # create the target file + touch hello p1: touch p1 p2: - touch p2 + touch p2 clean: - rm -f hello p1 p2 + rm -f hello p1 p2 ``` #### Marcos/Variables @@ -751,13 +748,14 @@ CFLAGS = -g # Flag for implicit rules. Turn on debug info # Implicit rule #1: blah is built via the C linker implicit rule # Implicit rule #2: blah.o is built via the C compilation implicit rule, because blah.c exists + blah: blah.o blah.c: - echo "int main() { return 0; }" > blah.c + echo "int main() { return 0; }" > blah.c clean: - rm -f blah* + rm -f blah* ``` #### Pattern Rules