2 # $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
3 ################################################################################
6 VERSNUM
:= $(shell grep VERSION ChangeLog | head
-1 | sed
-e
"s/VERSION //;s/ .*//")
7 VERSTAG
:= $(shell grep VERSION ChangeLog | head
-1 | grep
'XX' > /dev
/null
2> /dev
/null
&& echo
'beta')
8 VERSION
= $(VERSNUM
)$(VERSTAG
)
11 PKG_DIST
= $(PKG_NAME
)-$(VERSION
)
12 PKG_FILES
= AUTHORS ChangeLog COPYING README Makefile
13 PKG_DIRS
= configs htdocs
include install.d plugins po scripts templates upgrade
15 VCS_FILTER
= ! -name .arch-ids
! -name CVS
17 ################################################################################
22 build
: core banana wiki jquery
25 @echo
-e
"Code statistics\n"
26 @sloccount
$(filter-out wiki
/ spool
/, $(wildcard */)) 2> /dev
/null | egrep
'^[a-z]*:'
28 %: %.in Makefile ChangeLog
29 sed
-e
's,@VERSION@,$(VERSION),g' $< > $@
31 ################################################################################
38 core
: spool
/templates_c spool
/mails_c
include/globals.inc.php configs
/platal.cron htdocs
/.htaccess
40 spool
/templates_c spool
/mails_c spool
/uploads
:
44 htdocs
/.htaccess
: htdocs
/.htaccess.in Makefile
45 @REWRITE_BASE
="/~$$(id -un)"; \
46 test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE
="/"; \
47 sed
-e
"s,@REWRITE_BASE@,$$REWRITE_BASE,g" $< > $@
54 wiki
/local
/farmconfig.php \
55 wiki
/pub
/skins
/empty \
56 wiki
/cookbook
/e-protect.php \
61 wiki
: get-wiki build-wiki
63 build-wiki
: $(WIKI_NEEDS
) | get-wiki
65 htdocs
/uploads
: spool
/uploads
66 cd htdocs
&& ln
-sf ..
/spool
/uploads
69 cd htdocs
&& ln
-sf ..
/wiki
/pub wiki
75 cd
$@
&& ln
-sf ..
/..
/include/wiki
/wiki.d
/* .
78 wiki
/cookbook
/e-protect.php
:
79 cd wiki
/cookbook
&& ln
-sf ..
/..
/include/wiki
/e-protect.php
81 wiki
/local
/farmconfig.php
:
82 cd wiki
/local
/ && ln
-sf ..
/..
/include/wiki
/farmconfig.php
85 cd wiki
/pub
/skins
/ && ln
-sf ..
/..
/..
/include/wiki
/empty
89 @if
! test -d wiki
; then \
90 wget http
://www.pmwiki.org
/pub
/pmwiki
/pmwiki-latest.tgz
; \
91 tar -xzvf pmwiki-latest.tgz
; \
92 rm pmwiki-latest.tgz
; \
100 banana
: htdocs
/images
/banana htdocs
/css
/banana.css
101 htdocs
/images
/banana
:
102 cd
$(@D
) && ln
-sf
/usr
/share
/banana
/img
$(@F
)
104 htdocs
/css
/banana.css
:
105 cd
$(@D
) && ln
-sf
/usr
/share
/banana
/css
/style.css
$(@F
)
111 jquery
: htdocs
/javascript
/jquery.js htdocs
/javascript
/jquery.autocomplete.js
112 htdocs
/javascript
/jquery.js
:
113 wget http
://jquery.com
/src
/jquery-latest.pack.js
-O
$@
-q ||
($(RM
) $@
; exit
1)
115 ################################################################################
117 .PHONY
: build
dist clean wiki build-wiki banana