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.


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to