1 # $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $
2 ################################################################################
5 VERSION
:= $(shell grep VERSION ChangeLog | head
-1 | sed
-e
"s/VERSION //;s/\t.*//;s/ .*//")
8 PKG_DIST
= $(PKG_NAME
)-$(VERSION
)
9 PKG_FILES
= AUTHORS ChangeLog COPYING README Makefile
10 PKG_DIRS
= configs htdocs
include install.d plugins po scripts templates upgrade
12 VCS_FILTER
= ! -name .arch-ids
! -name CVS
14 ################################################################################
19 build
: core banana wiki
22 @echo
-e
"Code statistics\n"
23 @sloccount
$(filter-out wiki
/ spool
/, $(wildcard */)) 2> /dev
/null | egrep
'^[a-z]*:'
25 %: %.in Makefile ChangeLog
26 sed
-e
's,@VERSION@,$(VERSION),g' $< > $@
28 ################################################################################
35 core
: spool
/templates_c
include/globals.inc.php
37 spool
/templates_c spool
/uploads
:
47 wiki
/local
/farmconfig.php \
48 wiki
/pub
/skins
/empty \
49 wiki
/cookbook
/e-protect.php \
54 wiki
: get-wiki build-wiki
56 build-wiki
: $(WIKI_NEEDS
) | get-wiki
58 htdocs
/uploads
: spool
/uploads
59 cd htdocs
&& ln
-sf ..
/spool
/uploads
62 cd htdocs
&& ln
-sf ..
/wiki
/pub wiki
68 cd
$@
&& ln
-sf ..
/..
/include/wiki
/wiki.d
/* .
71 wiki
/cookbook
/e-protect.php
:
72 cd wiki
/cookbook
&& ln
-sf ..
/..
/include/wiki
/e-protect.php
74 wiki
/local
/farmconfig.php
:
75 cd wiki
/local
/ && ln
-sf ..
/..
/include/wiki
/farmconfig.php
78 cd wiki
/pub
/skins
/ && ln
-sf ..
/..
/..
/include/wiki
/empty
82 @if
! test -d wiki
; then \
83 wget http
://www.pmwiki.org
/pub
/pmwiki
/pmwiki-latest.tgz
; \
84 tar -xzvf pmwiki-latest.tgz
; \
85 rm pmwiki-latest.tgz
; \
93 banana
: htdocs
/images
/banana htdocs
/css
/banana.css
95 cd
$(@D
) && ln
-sf
/usr
/share
/banana
/img
$(@F
)
97 htdocs
/css
/banana.css
:
98 cd
$(@D
) && ln
-sf
/usr
/share
/banana
/css
/style.css
$(@F
)
100 ################################################################################
102 .PHONY
: build
dist clean wiki build-wiki banana