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 BANANA
:= $(shell ( [ -d ..
/banana
] && echo
`pwd`"/../banana" ) || echo
"/home/web/dev/banana")
10 VERSION
= $(VERSNUM
)$(VERSTAG
)
13 PKG_DIST
= $(PKG_NAME
)-$(VERSION
)
14 PKG_FILES
= AUTHORS ChangeLog COPYING README Makefile
15 PKG_DIRS
= configs htdocs
include install.d plugins po scripts templates upgrade
17 VCS_FILTER
= ! -name .arch-ids
! -name CVS
19 ################################################################################
24 build
: core banana wiki jquery
27 @echo
-e
"Code statistics\n"
28 @sloccount
$(filter-out wiki
/ spool
/, $(wildcard */)) 2> /dev
/null | egrep
'^[a-z]*:'
30 %: %.in Makefile ChangeLog
31 sed
-e
's,@VERSION@,$(VERSION),g' $< > $@
33 ################################################################################
40 core
: spool
/templates_c spool
/mails_c
include/globals.inc.php configs
/platal.cron htdocs
/.htaccess spool
/conf spool
/tmp
42 spool
/templates_c spool
/mails_c spool
/uploads spool
/conf spool
/tmp
:
46 htdocs
/.htaccess
: htdocs
/.htaccess.in Makefile
47 @REWRITE_BASE
="/~$$(id -un)"; \
48 test "$$REWRITE_BASE" = "/~web" && REWRITE_BASE
="/"; \
49 sed
-e
"s,@REWRITE_BASE@,$$REWRITE_BASE,g" $< > $@
56 wiki
/local
/farmconfig.php \
57 wiki
/pub
/skins
/empty \
58 wiki
/cookbook
/e-protect.php \
63 wiki
: get-wiki build-wiki
65 build-wiki
: $(WIKI_NEEDS
) | get-wiki
68 cd htdocs
&& ln
-sf ..
/spool
/uploads
71 cd htdocs
&& ln
-sf ..
/wiki
/pub wiki
77 cd
$@
&& ln
-sf ..
/..
/include/wiki
/wiki.d
/* .
80 wiki
/cookbook
/e-protect.php
:
81 cd wiki
/cookbook
&& ln
-sf ..
/..
/include/wiki
/e-protect.php
83 wiki
/local
/farmconfig.php
:
84 cd wiki
/local
/ && ln
-sf ..
/..
/include/wiki
/farmconfig.php
87 cd wiki
/pub
/skins
/ && ln
-sf ..
/..
/..
/include/wiki
/empty
91 @if
! test -d wiki
; then \
92 wget http
://www.pmwiki.org
/pub
/pmwiki
/pmwiki-latest.tgz
; \
93 tar -xzvf pmwiki-latest.tgz
; \
94 rm pmwiki-latest.tgz
; \
102 banana
: htdocs
/images
/banana htdocs
/css
/banana.css
include/banana
/banana.inc.php
103 htdocs
/images
/banana
:
104 cd
$(@D
) && ln
-snf
$(BANANA
)/img
$(@F
)
106 htdocs
/css
/banana.css
:
107 cd
$(@D
) && ln
-snf
$(BANANA
)/css
/style.css
$(@F
)
109 include/banana
/banana.inc.php
:
110 cd
$(@D
) && find
$(BANANA
)/banana
/ -name
'*.php' -exec ln
-snf
{} .
";"
118 jquery
: htdocs
/javascript
/jquery.js htdocs
/javascript
/jquery.autocomplete.js
119 htdocs
/javascript
/jquery.js
:
120 wget http
://jquery.com
/src
/jquery-latest.pack.js
-O
$@
-q ||
($(RM
) $@
; exit
1)
122 ################################################################################
124 .PHONY
: build
dist clean wiki build-wiki banana htdocs
/images
/banana htdocs
/css
/banana.css
include/banana
/banana.inc.php