Skip to content

Instantly share code, notes, and snippets.

@jdunne
Created August 3, 2012 22:04
Show Gist options
  • Save jdunne/3251978 to your computer and use it in GitHub Desktop.
Save jdunne/3251978 to your computer and use it in GitHub Desktop.
Makefile for running a command on a bunch input files (*.txt)
.PHONY: clean all
%.out : %.txt
# Substitute real command for cat.
cat $?
touch $@
all : $(patsubst %.txt,%.out,$(wildcard *.txt))
clean:
@echo 'Cleaning output files.'
rm *.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment