diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-05-04 09:48:27 -0700 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-05-04 09:48:27 -0700 |
commit | 247f5d615539784c46b5c7c5b35b6ee348e04151 (patch) | |
tree | 6744bd1584ad1239417e4c8e148f98d1d27909eb /Makefile |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2f9fab4 --- /dev/null +++ b/Makefile @@ -0,0 +1,46 @@ +Makefiles += gen.sh +pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH))))) +pick = $(firstword $(foreach prog,$1,$(call pathsearch,$(prog))) false) + +COFFEE = coffee +CONVERT = convert +CP = cp +MKDIRS = mkdir -p +PHP = $(call pick,php5 php) +RM = rm -f +SASS = sass + +PDF2PPM = pdftoppm +PDF2TXT = pdftotext +PHP2ANY = $(PHP) -f +PPM2JPG = ppmtojpeg +SCSS2CSS = $(SASS) + +all: PHONY + echo */|sed 's@/\s*@\n@g'|sort -n|xargs bash gen.sh + +.SECONDARY: + +%.ppm: %.pdf $(MAKEFILES) + $(PDF2PPM) '$<' > '$@' +%.jpg: %.ppm $(MAKEFILES) + $(PPM2JPG) '$<' > '$@' +%.txt: %.pdf $(MAKEFILES) + $(PDF2TXT) '$<' > '$@' +%: %.php $(MAKEFILES) + $(PHP2ANY) '$<' > '$@' +%.css: %.scss $(MAKEFILES) + $(SCSS2CSS) '$<' > '$@' +%.js: %.coffee $(MAKEFILES) + $(COFFEE) -c '$<' +%.small.jpg: %.jpg $(MAKEFILES) + $(CONVERT) '$<' -resize x700 '$@' + +%/index.php: issue.php $(MAKEFILES) + $(CP) '$<' '$@' +%/view.css: view.css $(MAKEFILES) + $(CP) '$<' '$@' +%/view.js: view.js $(MAKEFILES) + $(CP) '$<' '$@' + +.PHONY: PHONY
\ No newline at end of file |