X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=e8abfa647924764bd8f666ec33c298fc79058ac0;hb=5b4598828acca724080fb36c1f13b30e95b7e891;hp=1fa5447d7d9e047d0327a49a8529f216b803e295;hpb=71ea2622d4115039d8f121a6595d6a005866f4c3;p=platal.git diff --git a/Makefile b/Makefile index 1fa5447..e8abfa6 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,51 +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' ` - -build: 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' $< > $@ ################################################################################ # targets -templates_c uploads wiki.d:: + +## +## core +## + +core: spool/templates_c include/platal/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: - cd htdocs && ln -sf ../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 + +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 + +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: build-wiki uploads htdocs/uploads htdocs/wikipub - @test -d wiki || wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz -wiki.d:: - cd $@ && ln -s ../install.d/wiki/wiki.d/* . +get-wiki: + @if ! test -d wiki; then \ + wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \ + tar -xzvf pmwiki-latest.tgz; \ + rm pmwiki-latest.tgz; \ + mv pmwiki-* wiki; \ + fi + +## +## banana +## + +banana: htdocs/images/banana htdocs/css/banana.css +htdocs/images/banana: + cd $(@D) && ln -sf /usr/share/banana/img $(@F) -build-wiki: wiki/local/pmwiki.config.php wiki/pub/skins/empty wiki.d +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