Dotclear

source: Makefile @ 290:4f1e03dfe9dd

Revision 290:4f1e03dfe9dd, 3.2 KB checked in by Franck <carnet.franck.paul@…>, 14 years ago (diff)

Modif Makefile pour virer les scories

Line 
1SHELL=/bin/sh
2
3DIST=_dist
4DC=$(DIST)/dotclear
5
6default:
7     @echo "make config or make dist"
8
9config:
10     mkdir -p ./$(DC)
11     
12     ## Copy needed folders and files
13     cp -pRf ./admin ./inc ./themes ./index.php ./CHANGELOG ./CREDITS ./LICENSE ./README ./$(DC)/
14     
15     ## Locales directory
16     mkdir -p ./$(DC)/locales
17     cp -pRf ./locales/README ./locales/en ./locales/fr ./$(DC)/locales/
18     
19     ## Create cache, db, plugins and public folders
20     mkdir ./$(DC)/cache ./$(DC)/db ./$(DC)/plugins ./$(DC)/public
21     cp inc/.htaccess ./$(DC)/cache/
22     cp inc/.htaccess ./$(DC)/db/
23     cp inc/.htaccess ./$(DC)/plugins/
24     
25     ## Remove .svn folders
26     find ./$(DIST)/ -type d -name '.svn' | xargs rm -rf
27     
28     ## Remove config file if any
29     rm -f ./$(DC)/inc/config.php
30     
31     ## Copy built-in plugins
32     cp -pRf \
33     ./plugins/aboutConfig \
34     ./plugins/akismet \
35     ./plugins/antispam \
36     ./plugins/blogroll \
37     ./plugins/blowupConfig \
38     ./plugins/fairTrackbacks \
39     ./plugins/importExport \
40     ./plugins/maintenance \
41     ./plugins/tags \
42     ./plugins/pages \
43     ./plugins/pings \
44     ./plugins/themeEditor \
45     ./plugins/userPref \
46     ./plugins/widgets \
47     ./$(DC)/plugins/
48     
49     ## Remove .svn folders
50     find ./$(DIST)/ -type d -name '.svn' -print0 | xargs -0 rm -rf
51     
52     ## Remove .hg* files and folders
53     find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf
54     find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf
55
56     ## "Compile" .po files
57     ./build-tools/make-l10n.php ./$(DC)/
58     
59     ## Pack javascript files
60     find $(DC)/admin/js/*.js -exec ./build-tools/min-js.php \{\} \;
61     find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \;
62     find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \;
63     find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \;
64     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \;
65     find $(DC)/themes/default/js/*.js -exec ./build-tools/min-js.php \{\} \;
66     
67     ## Debug off
68     perl -pi -e "s|^//\*== DC_DEBUG|/*== DC_DEBUG|sgi;" $(DC)/inc/prepend.php $(DC)/inc/prepend.php
69     
70     ## Create digest
71     cd $(DC) && ( \
72          md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./db/*" -not -path ./CHANGELOG` \
73          > inc/digests \
74     )
75     
76     touch config-stamp
77
78dist: config dist-tgz dist-zip dist-l10n
79
80deb:
81     cp ./README debian/README
82     dpkg-buildpackage -rfakeroot
83
84dist-tgz:
85     [ -f config-stamp ]
86     cd $(DIST) && tar cfz dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).tar.gz ./dotclear
87
88dist-zip:
89     [ -f config-stamp ]
90     cd $(DIST) && zip -r9 dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).zip ./dotclear
91
92dist-l10n:
93     [ -f config-stamp ]
94     
95     rm -rf ./$(DIST)/l10n
96     mkdir -p ./$(DIST)/l10n
97     
98     find ./locales/ -maxdepth 1 -mindepth 1 -type d -not -name '.svn' -not -name '_pot' -not -name 'en' \
99     -exec cp -pRf \{\} ./$(DIST)/l10n/ \;
100     
101     find ./$(DIST)/l10n -type d -name '.svn' | xargs rm -rf
102     ./build-tools/make-l10n.php ./$(DIST)/l10n/
103     
104     cd ./$(DIST)/l10n && for i in *; do \
105          zip -r9 "$$i-$$(grep DC_VERSION ../dotclear/inc/prepend.php | cut -d"'" -f4).zip" "$$i"; \
106          rm -rf "$$i"; \
107     done
108     
109
110clean:
111     [ -f config-stamp ]
112     rm -rf $(DIST)
113     rm -f config-stamp build-stamp configure-stamp
114
115
116## Modules (Themes and Plugins) ###############################################
117pack-tool:
118     [ "$(ipath)" != '' ]
119     [ "$(iname)" != '' ]
120     [ "$(iname)" != '' ]
121     [ -d $(ipath)/$(iname) ]
122     
123     
Note: See TracBrowser for help on using the repository browser.

Sites map