Skip to content

Instantly share code, notes, and snippets.

@sirjofri
Created July 15, 2018 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirjofri/6af7fd2d3b0bf87ae2ee06f18b594f64 to your computer and use it in GitHub Desktop.
Save sirjofri/6af7fd2d3b0bf87ae2ee06f18b594f64 to your computer and use it in GitHub Desktop.
Farbfeld makefile enhancement
CWD=$(shell pwd)
all:
@TMPDIR=`mktemp -d` && \
cd $$TMPDIR && \
make -f $(CWD)/Makefile output_files && \
cp $(addprefix $$TMPDIR/,$(output)) $(CWD) && \
rm -Rf $$TMPDIR
# define your outputs
output = tex1.ff tex2.ff tex3.ff
# include ff.mk only if it exists!
ifneq (,$(wildcard ff.mk))
include ff.mk
endif
# make a target for your outputs
output_files: $(output)
tex1.ff:
ff-glow 512
tex2.ff:
ff-glow 512
tex3.ff:
ff-glow 512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment