For loop through names in GNU make -



For loop through names in GNU make -

i have bunch of .dot files (for example, a.dot, b.dot, c.dot) , want compile them .png files neato. currently, create command have looks this:

neato -tpng -o a.png a.dot neato -tpng -o b.png b.dot neato -tpng -o c.png c.dot

obviously, non-scalable, , i'd write take every file .dot extension, , compile equivalently-named .png file. i'm not sure how write such loop in create - help appreciated.

this pretty much basic create 101:

srcs = a.dot b.dot c.dot objs = $(srcs:%.dot=%.png) all: $(objs) %.png : %.dot neato -tpng -o $@ $<

you don't "loops" in make; define targets , prerequisites.

for-loop make

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -