X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=3859605703f49052f3be49bfa25384ad4f455aa6;hb=baa8a5945e29594a3678ce446a643e6a9b56fd93;hp=26b73521753ecab5e4cf57776f23300865ed0716;hpb=7faf6e6a278ad1f42345d53bf2a0691ca0da9691;p=platal.git diff --git a/Makefile b/Makefile index 26b7352..3859605 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ + # $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $ ################################################################################ # 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 +17,100 @@ VCS_FILTER = ! -name .arch-ids ! -name CVS all: build -devel: build htdocs/valid.html - -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 +build: core banana wiki jquery -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 +%: %.in Makefile ChangeLog sed -e 's,@VERSION@,$(VERSION),g' $< > $@ ################################################################################ # targets -spool/templates_c spool/uploads spool/wiki.d:: + +## +## core +## + +core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess + +spool/templates_c spool/mails_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/.htaccess: htdocs/.htaccess.in Makefile + @REWRITE_BASE="/~$$(id -un)"; \ + test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE="/"; \ + sed -e "s,@REWRITE_BASE@,$$REWRITE_BASE,g" $< > $@ + +## +## 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: +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 ../../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: build-wiki spool/uploads htdocs/uploads htdocs/wikipub - @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) -spool/wiki.d:: - cd $@ && ln -s ../../install.d/wiki/wiki.d/* . +## +## jquery +## -build-wiki: wiki/local/pmwiki.config.php wiki/pub/skins/empty spool/wiki.d +jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js +htdocs/javascript/jquery.js: + wget http://jquery.com/src/jquery-latest.pack.js -O htdocs/javascript/jquery.js -q ################################################################################ -.PHONY: build dist clean wiki build-wiki +.PHONY: build dist clean wiki build-wiki banana