X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=2a26014264a4c6b1483d5dffa7580baa623a888f;hb=db9c38388c6d941c9aff798921a69317ff88ce8f;hp=527e6e531954adb100703d936775a6aa2c3b12dc;hpb=b66268df083dcddbc6318f5c3e2307def8f0a2ae;p=platal.git diff --git a/Makefile b/Makefile index 527e6e5..2a26014 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,46 +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: templates_c wiki - -clean: - rm -rf include/platal/globals.inc.php - -%: %.in Makefile +%: %.in Makefile ChangeLog sed -e 's,@VERSION@,$(VERSION),g' $< > $@ ################################################################################ # targets -templates_c uploads: + +## +## core +## + +core: spool/templates_c include/globals.inc.php configs/platal.cron + +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 +## -htdocs/wikipub: - cd htdocs && ln -sf ../wiki/pub wikipub +WIKI_NEEDS = \ + wiki/local/farmconfig.php \ + wiki/pub/skins/empty \ + wiki/cookbook/e-protect.php \ + spool/wiki.d \ + htdocs/uploads \ + htdocs/wiki \ -wiki/local/pmwiki.config.php: - cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php +wiki: get-wiki build-wiki + +build-wiki: $(WIKI_NEEDS) | get-wiki + +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 ../../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; \ + 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) -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 +htdocs/css/banana.css: + cd $(@D) && ln -sf /usr/share/banana/css/style.css $(@F) ################################################################################ -.PHONY: build dist clean wiki +.PHONY: build dist clean wiki build-wiki banana