Skip to content

Instantly share code, notes, and snippets.

@simenbrekken
Created November 14, 2012 08:15
Show Gist options
  • Select an option

  • Save simenbrekken/4070954 to your computer and use it in GitHub Desktop.

Select an option

Save simenbrekken/4070954 to your computer and use it in GitHub Desktop.
Variable expansion in Makefile
SPRITES = $(shell find lib/images/generated/sprites -name "*.png")
lib/%.min.css: lib/%.css
$(SPRITER) -t images/generated/sprites/$(shell basename $< .css) -f images/sprites $< | $(CLEANCSS) > $@
optipng -o7 -quiet $(SPRITES) # No such file
advdef -z -4 -q $(SPRITES) # No such file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment