X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=07748fe6192679ec8336019d27c7f76b027cda2f;hb=bff6d838583f08251b39bf8626fab7684376c935;hp=df390c42c62b6254893cd36ea1c77665cc5be580;hpb=08dbcb5ad90602bde3da057340bea5c1068b30b5;p=platal.git diff --git a/Makefile b/Makefile index df390c4..07748fe 100644 --- a/Makefile +++ b/Makefile @@ -16,51 +16,67 @@ 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 include/platal/globals.inc.php banana - -clean: - rm -rf include/platal/globals.inc.php - -%: %.in Makefile +%: %.in Makefile ChangeLog sed -e 's,@VERSION@,$(VERSION),g' $< > $@ ################################################################################ # targets +## +## core +## + +core: spool/templates_c include/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/cookbook/e-protect.php: - cd wiki/cookbook && ln -sf ../../install.d/wiki/e-protect.php +## +## wiki +## + +WIKI_NEEDS = \ + wiki/local/farmconfig.php \ + wiki/pub/skins/empty \ + wiki/cookbook/e-protect.php \ + spool/wiki.d \ + htdocs/uploads \ + htdocs/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 +wiki: get-wiki build-wiki -htdocs/uploads: +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 ../../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 \ @@ -70,17 +86,17 @@ get-wiki: mv pmwiki-* wiki; \ fi -banana: htdocs/img htdocs/css/banana.css -htdocs/img: - cd $(@D) && ln -sf /usr/share/banana/img +## +## 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) -build-wiki: wiki/local/farmconfig.php wiki/pub/skins/empty spool/wiki.d - -wiki: get-wiki build-wiki spool/uploads htdocs/uploads htdocs/wiki wiki/cookbook/e-protect.php - ################################################################################ .PHONY: build dist clean wiki build-wiki banana