COMPILER=lessc --yui-compress
LINT=recess
OUTPUT=../css
THEMES=default modern

all:
	@for i in ${THEMES};\
	do mkdir -p ${OUTPUT}/$${i};\
	${COMPILER} themes/$${i}/master.less > ${OUTPUT}/$${i}/master.css;\
    if test -d themes/$${i}/page;\
    then mkdir -p ${OUTPUT}/$${i}/page;\
    for j in `find ./themes/$${i}/page -name *.less`;\
    do file_name=`basename $${j} ".less"`;\
    ${COMPILER} $${j} > ${OUTPUT}/$${i}/page/$${file_name}.css;\
    done;\
    fi;\
	done
