Compile LESS CSS and Markdown files with Make

Here is a simple example Makefile to automatically compile any changed LESS CSS, or Markdown files and then update a remote server using rsync:

EXCLUDE = --exclude=.* --exclude=node_modules/
EXCLUDE_MF = --exclude=Makefile

LESS = public/css/screen.less public/css/print.less
MD = public/

CSS = $(LESS:.less=.css)
HTML = $(

%.css: %.less
   lessc -x $< > $@

   markdown $< > $@

all: markdown less rsync

markdown: $(HTML)

less: $(CSS)

   rsync -avLP --delete $(EXCLUDE) $(EXCLUDE_MF) ./ user@host:/target/path