X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=02e5c01360dac8de563e9574824a2caf71903b21;hb=03a5279f6c5b82ac6a14b2d9cb995f0be4e2557c;hp=527e6e531954adb100703d936775a6aa2c3b12dc;hpb=b66268df083dcddbc6318f5c3e2307def8f0a2ae;p=platal.git diff --git a/Makefile b/Makefile index 527e6e5..02e5c01 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ 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: templates_c wiki +build: spool/templates_c wiki clean: rm -rf include/platal/globals.inc.php @@ -32,30 +32,52 @@ clean: ################################################################################ # targets -templates_c uploads: + +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/cookbook/e-protect.php: + cd wiki/cookbook && ln -sf ../../install.d/wiki/e-protect.php htdocs/valid.html: - touch templates_c/valid.html - cd htdocs && ln -sf ../templates_c/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 htdocs/uploads: - cd htdocs && ln -sf ../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/local/farmconfig.php: + cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php farmconfig.php wiki/pub/skins/empty: cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty -wiki: uploads htdocs/uploads htdocs/wikipub wiki/local/pmwiki.config.php wiki/pub/skins/empty - @test -d wiki || wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz +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; \ + fi + +build-wiki: wiki/local/farmconfig.php wiki/pub/skins/empty spool/wiki.d + @sed -e 's/^exit;/\/\/exit;/g' wiki/pmwiki.php > wiki/pmwiki.php.new + @mv wiki/pmwiki.php.new wiki/pmwiki.php + +wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wiki wiki/cookbook/e-protect.php ################################################################################ -.PHONY: build dist clean wiki +.PHONY: build dist clean wiki build-wiki