add jquery script, use it to autoload on xnet when xorg cookie is present
[platal.git] / Makefile
index 1a31049..4004963 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+
 # $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
 ################################################################################
 # definitions
@@ -16,13 +17,13 @@ VCS_FILTER = ! -name .arch-ids ! -name CVS
 
 all: build
 
-build: core banana wiki
+build: core banana wiki jquery
 
 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' $< > $@
 
 ################################################################################
@@ -32,12 +33,16 @@ q:
 ## core
 ##
 
-core: spool/templates_c include/platal/globals.inc.php
+core: spool/templates_c spool/mails_c include/globals.inc.php configs/platal.cron htdocs/.htaccess
 
-spool/templates_c spool/uploads:
+spool/templates_c spool/mails_c spool/uploads:
        mkdir -p $@
        chmod o+w $@
 
+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
@@ -97,6 +102,14 @@ htdocs/images/banana:
 htdocs/css/banana.css:
        cd $(@D) && ln -sf /usr/share/banana/css/style.css $(@F)
 
+##
+## jquery
+##
+
+jquery: htdocs/javascript/jquery.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 banana