(Similar question here). For every .x file in the directory I want to run a command to generate an HTML file. The command already works fine, it's the Makefile that I'm having trouble with. Here's what I came up with:
all: $(OBJECTS)
OBJECTS := $(patsubst %.x,%.html,$(wildcard *.x))
%.html: %.x
generate $< > $@
The OBJECTS variable is meant to contain all html files I need to generate. Invoking make
states nothing to be done for 'all'
, and there are no HTML files already in the directory.