X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=07748fe6192679ec8336019d27c7f76b027cda2f;hb=cf5e8ef11616fbc68677158631376f6813b62c26;hp=fd63c8da70e34c686ea7754f9808945517c75ba7;hpb=d207e9f555f9ece833cf1e0f05f86f60aa199be9;p=platal.git diff --git a/Makefile b/Makefile index fd63c8d..07748fe 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ ################################################################################ # definitions -VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//") +VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//;s/ .*//") PKG_NAME = platal PKG_DIST = $(PKG_NAME)-$(VERSION) @@ -16,59 +16,88 @@ VCS_FILTER = ! -name .arch-ids ! -name CVS all: build -devel: build htdocs/valid.html +build: core banana wiki -headers: - headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \ - `find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' ` +q: + @echo -e "Code statistics\n" + @sloccount $(filter-out wiki/ spool/, $(wildcard */)) 2> /dev/null | egrep '^[a-z]*:' -build: spool/templates_c wiki - -clean: - rm -rf include/platal/globals.inc.php - -%: %.in Makefile +%: %.in Makefile ChangeLog sed -e 's,@VERSION@,$(VERSION),g' $< > $@ ################################################################################ # targets -spool/templates_c spool/uploads spool/wiki.d:: + +## +## core +## + +core: spool/templates_c include/globals.inc.php + +spool/templates_c spool/uploads: mkdir -p $@ chmod o+w $@ -htdocs/valid.html: - touch templates_c/valid.html - cd htdocs && ln -sf ../templates_c/valid.html -htdocs/uploads: +## +## wiki +## + +WIKI_NEEDS = \ + wiki/local/farmconfig.php \ + wiki/pub/skins/empty \ + wiki/cookbook/e-protect.php \ + spool/wiki.d \ + htdocs/uploads \ + htdocs/wiki \ + +wiki: get-wiki build-wiki + +build-wiki: $(WIKI_NEEDS) | get-wiki + +htdocs/uploads: spool/uploads cd htdocs && ln -sf ../spool/uploads -htdocs/wikipub: - cd htdocs && ln -sf ../wiki/pub wikipub +htdocs/wiki: + cd htdocs && ln -sf ../wiki/pub wiki -wiki/local/pmwiki.config.php: - cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php -wiki/pub/skins/empty: - cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty +spool/wiki.d: + mkdir -p $@ + chmod o+w $@ + cd $@ && ln -sf ../../include/wiki/wiki.d/* . -wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wikipub -spool/wiki.d:: - cd $@ && ln -s ../../install.d/wiki/wiki.d/* . +wiki/cookbook/e-protect.php: + cd wiki/cookbook && ln -sf ../../include/wiki/e-protect.php + +wiki/local/farmconfig.php: + cd wiki/local/ && ln -sf ../../include/wiki/farmconfig.php + +wiki/pub/skins/empty: + cd wiki/pub/skins/ && ln -sf ../../../include/wiki/empty + get-wiki: @if ! test -d wiki; then \ wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \ - echo "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯"; \ - echo "now please untar pmwiki into wiki/ and run make again"; \ - echo "_____________________________________________________"; \ - exit 1; \ + tar -xzvf pmwiki-latest.tgz; \ + rm pmwiki-latest.tgz; \ + mv pmwiki-* wiki; \ fi -build-wiki: wiki/local/pmwiki.config.php wiki/pub/skins/empty spool/wiki.d +## +## banana +## + +banana: htdocs/images/banana htdocs/css/banana.css +htdocs/images/banana: + cd $(@D) && ln -sf /usr/share/banana/img $(@F) + +htdocs/css/banana.css: + cd $(@D) && ln -sf /usr/share/banana/css/style.css $(@F) ################################################################################ -.PHONY: build dist clean wiki build-wiki +.PHONY: build dist clean wiki build-wiki banana