make

Remove words from a list

FILTER = index.html test.html 404.html
PAGES = $(sort $(filter-out $(FILTER), $(wildcard *.html)))

Get 2nd dependency

.PHONY: all first second third
all: first second third
    echo $(word 2,$^)

See also