X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=a32cc3e8feb715e8acb204537a2f2fee685950d7;hb=baa62e58cdfb6839040e156ef91e2827bdde1600;hp=527e6e531954adb100703d936775a6aa2c3b12dc;hpb=b66268df083dcddbc6318f5c3e2307def8f0a2ae;p=platal.git diff --git a/Makefile b/Makefile index 527e6e5..a32cc3e 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ + # $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.*//") +VERSNUM := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/ .*//") +VERSTAG := $(shell grep VERSION ChangeLog | head -1 | grep 'XX' > /dev/null 2> /dev/null && echo 'beta') +VERSION = $(VERSNUM)$(VERSTAG) PKG_NAME = platal PKG_DIST = $(PKG_NAME)-$(VERSION) @@ -16,46 +19,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: 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 -templates_c uploads: + +## +## 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: spool/uploads + cd htdocs && ln -sf ../spool/uploads -htdocs/uploads: - cd htdocs && ln -sf ../uploads +htdocs/wiki: + cd htdocs && ln -sf ../wiki/pub wiki -htdocs/wikipub: - cd htdocs && ln -sf ../wiki/pub wikipub -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) + +htdocs/css/banana.css: + cd $(@D) && ln -sf /usr/share/banana/css/style.css $(@F) + +## +## jquery +## -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 +jquery: htdocs/javascript/jquery.js htdocs/javascript/jquery.autocomplete.js +htdocs/javascript/jquery.js: + wget http://jquery.com/src/jquery-latest.pack.js -O $@ -q || ($(RM) $@; exit 1) ################################################################################ -.PHONY: build dist clean wiki +.PHONY: build dist clean wiki build-wiki banana