X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=1a310499ad1272ed34195547bcabbd3734c98c15;hb=2c79924909ecda6dcbaf5ba3592cb864726d4c58;hp=0a8a76381d6e3521697ddc278abc47fa4a270eaa;hpb=52165f0eb1fd65bf2e388fcc037389c29a60a0a2;p=platal.git diff --git a/Makefile b/Makefile index 0a8a763..1a31049 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,16 +16,11 @@ 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' ` - -build: spool/templates_c wiki - -clean: - rm -rf include/platal/globals.inc.php +q: + @echo -e "Code statistics\n" + @sloccount $(filter-out wiki/ spool/, $(wildcard */)) 2> /dev/null | egrep '^[a-z]*:' %: %.in Makefile sed -e 's,@VERSION@,$(VERSION),g' $< > $@ @@ -33,47 +28,76 @@ clean: ################################################################################ # targets +## +## core +## + +core: spool/templates_c include/platal/globals.inc.php + spool/templates_c spool/uploads: mkdir -p $@ chmod o+w $@ -spool/wiki.d: - mkdir -p $@ - chmod o+w $@ - cd $@ && ln -sf ../../install.d/wiki/wiki.d/* . +## +## 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 -htdocs/valid.html: - touch spool/templates_c/valid.html - chmod o+w spool/templates_c/valid.html - cd htdocs && ln -sf ../spool/templates_c/valid.html +build-wiki: $(WIKI_NEEDS) | get-wiki -htdocs/uploads: +htdocs/uploads: spool/uploads cd htdocs && ln -sf ../spool/uploads htdocs/wiki: cd htdocs && ln -sf ../wiki/pub wiki + +spool/wiki.d: + mkdir -p $@ + chmod o+w $@ + cd $@ && ln -sf ../../include/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 ../../plugins/pmwiki.config.php farmconfig.php + cd wiki/local/ && ln -sf ../../include/wiki/farmconfig.php wiki/pub/skins/empty: - cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/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/farmconfig.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) -wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wiki +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