Dotclear

source: Makefile @ 2615:09b5b27127a8

Revision 2615:09b5b27127a8, 3.5 KB checked in by Nicolas <nikrou77@…>, 12 years ago (diff)

Update Makefile
Activate dcLegacyEditor by default
Addresses #1896

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

Sites map