Makefile: for each .x file, create a .html file -


(similar question here). every .x file in directory want run command generate html file. command works fine, it's makefile i'm having trouble with. here's came with:

all: $(objects) objects := $(patsubst %.x,%.html,$(wildcard *.x))  %.html: %.x     generate $< > $@ 

the objects variable meant contain html files need generate. invoking make states nothing done 'all', , there no html files in directory.

turns out make sensitive order of variable definitions. makefile works when first 2 lines switched!


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -