The code below does not work but meant to illustrate what I want to achieve. How can I make this code work or is there a better way. I want to combine all my CSS files into one file, but want to make sure all files under BASE_CSS is at the top of that file.
BASE_CSS = %reset.css %reset2.css %reset3.css
IGNORE_CSS = %main.min.css $(BASE_CSS)
CSS_FILES = $(filter-out $(IGNORE_CSS),$(wildcard \
public/css/*.css \
public/css/*/*.css \
public/css/*/*/*.css \
))
minify:
cat $(BASE_CSS) $(CSS_FILES) > public/css/main.min.css
This will do what I think you want:
EDIT:
To specify the order, just do this: