|
From: | givemecode |
Subject: | What is the difference between > and >> in a makefile. |
Date: | Mon, 28 Mar 2011 11:15:46 -0700 (PDT) |
I modified a for loop in a makefile that looked like this: @for f in $(DRV_GEN_HEADER) ; do echo "#include \""$$f"\"" >> $@ ; done which puts the output of echo into a new file I sepcified. changed to this: @for f in $(INCLUDE_DIR)/%.h); do \ echo "#include \""$$f"\""; \ done > '$@' which does the same thing but the writing is done after the loop completes (I think). Can someone please explain the difference and why it works? -- View this message in context: http://old.nabble.com/What-is-the-difference-between-%3E-and-%3E%3E-in-a-makefile.-tp31260849p31260849.html Sent from the Gnu - Make - Help mailing list archive at Nabble.com.
[Prev in Thread] | Current Thread | [Next in Thread] |