X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=0b6b37bbea8a314838fbc298ec47805c6cc4aab4;hb=7b642046b0dbaf122f12beeb565879f3b3dd8171;hp=88764256549a3d01d1eae0afed36cfa4ab9ab0d4;hpb=de99248c4078f3646316e3d09dfa9fe999bbd97d;p=platal.git diff --git a/Makefile b/Makefile index 8876425..0b6b37b 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,17 @@ PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade VCS_FILTER = ! -name .arch-ids ! -name CVS +define download +@echo "Downloading $@ from $(DOWNLOAD_SRC)" +wget $(DOWNLOAD_SRC) -O $@ -q || ($(RM) $@; exit 1) +endef + ################################################################################ # global targets all: build -build: core banana wiki jquery +build: core banana wiki medals jquery q: @echo -e "Code statistics\n" @@ -109,20 +114,39 @@ htdocs/css/banana.css: include/banana/banana.inc.php: cd $(@D) && find $(BANANA)/banana/ -name '*.php' -exec ln -snf {} . ";" +## +## Medal thumbnails +## +MEDAL_PICTURES=$(wildcard htdocs/images/medals/*.jpg) +MEDAL_THUMBNAILS=$(subst /medals/,/medals/thumb/,$(MEDAL_PICTURES)) + +medals: $(MEDAL_THUMBNAILS) +$(MEDAL_THUMBNAILS): $(subst /medals/thumb/,/medals/,$(@F)) + convert -resize x50 $(subst /medals/thumb/,/medals/,$@) $@ ## ## jquery ## -jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js htdocs/javascript/jquery.color.js +JQUERY_PLUGINS=color +JQUERY_PLUGINS_PATHES=$(addprefix htdocs/javascript/jquery.,$(addsuffix .js,$(JQUERY_PLUGINS))) + +jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js $(JQUERY_PLUGINS_PATHES) + +htdocs/javascript/jquery.js: DOWNLOAD_SRC = http://jquery.com/src/jquery-latest.pack.js htdocs/javascript/jquery.js: - wget http://jquery.com/src/jquery-latest.pack.js -O $@ -q || ($(RM) $@; exit 1) + @$(download) + +htdocs/javascript/jquery.autocomplete.js: DOWNLOAD_SRC = http://jquery-autocomplete.googlecode.com/svn/trunk/jquery.autocomplete.js +htdocs/javascript/jquery.autocomplete.js: + @$(download) -htdocs/javascript/jquery.color.js: - wget http://plugins.jquery.com/files/jquery.color.js.txt -O $@ -q || ($(RM) $@; exit 1) +$(JQUERY_PLUGINS_PATHES): DOWNLOAD_SRC = http://plugins.jquery.com/files/$(@F).txt +$(JQUERY_PLUGINS_PATHES): + @$(download) ################################################################################ -.PHONY: build dist clean wiki build-wiki banana htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php +.PHONY: build dist clean wiki build-wiki banana htdocs/images/banana htdocs/css/banana.css include/banana/banana.inc.php http*