Dotclear

source: Makefile @ 3418:f74c218a7b8e

Revision 3418:f74c218a7b8e, 3.9 KB checked in by franck <carnet.franck.paul@…>, 9 years ago (diff)

IE 7, 8 and 9 not more supported (should not be problematic for IE9 — gracefully degraded, but it will for IE7 and IE8 users)

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
[2931]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      \
[2999]24            ./$(DC)/.atoum.* ./$(DC)/test ./$(DC)/travis                        \
[2931]25            ./$(DC)/features ./$(DC)/travis ./$(DC)/behat.yml.dist ./$(DC)/composer.*
[2558]26
[3260]27     ## Create cache, var, db, plugins, themes and public folders
28     mkdir ./$(DC)/cache ./$(DC)/var ./$(DC)/db ./$(DC)/plugins ./$(DC)/themes ./$(DC)/public
[2558]29     cp -p inc/.htaccess ./$(DC)/cache/
[3260]30     cp -p inc/.htaccess ./$(DC)/var/
[2558]31     cp -p inc/.htaccess ./$(DC)/db/
32     cp -p inc/.htaccess ./$(DC)/plugins/
[2537]33
[0]34     ## Remove config file if any
35     rm -f ./$(DC)/inc/config.php
[2537]36
[2558]37     ## Copy built-in themes
38     cp -pRf \
39     ./themes/default \
40     ./themes/blueSilence \
41     ./themes/customCSS \
42     ./themes/ductile \
[2642]43     ./themes/berlin \
[2558]44     ./$(DC)/themes/
45
[2615]46     ## Copy built-in plugins based on DC_DISTRIB_PLUGINS constant
47     cp -pRf $$(grep DC_DISTRIB_PLUGINS inc/prepend.php | \
48          sed -e "s/.*,'//" -e "s/'.*//" | \
49          sed -e  's/\(^\|,\)/ .\/plugins\//g') \
[0]50     ./$(DC)/plugins/
[2537]51
[0]52     ## "Compile" .po files
53     ./build-tools/make-l10n.php ./$(DC)/
[2537]54
[0]55     ## Pack javascript files
56     find $(DC)/admin/js/*.js -exec ./build-tools/min-js.php \{\} \;
[3305]57     find $(DC)/admin/js/codemirror -name '*.js' -exec ./build-tools/min-js.php \{\} \;
[0]58     find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \;
[1451]59     find $(DC)/admin/js/jsUpload/*.js -exec ./build-tools/min-js.php \{\} \;
[0]60     find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \;
61     find $(DC)/themes/default/js/*.js -exec ./build-tools/min-js.php \{\} \;
[2801]62     find $(DC)/inc/js -name '*.js' -exec ./build-tools/min-js.php \{\} \;
[2537]63
[0]64     ## Debug off
65     perl -pi -e "s|^//\*== DC_DEBUG|/*== DC_DEBUG|sgi;" $(DC)/inc/prepend.php $(DC)/inc/prepend.php
[2537]66
[2558]67     ## Remove scm files and folders from DC and CB
68     find ./$(DIST)/ -type d -name '.svn' | xargs -r rm -rf
69     find ./$(DIST)/ -type d -name '.hg'  | xargs -r rm -rf
70     find ./$(DIST)/ -type d -name '.git' | xargs -r rm -rf
71     find ./$(DIST)/ -type f -name '.*ignore' | xargs -r rm -rf
[2896]72     find ./$(DIST)/ -type f -name '.flow' | xargs -r rm -rf
[2558]73
[0]74     ## Create digest
75     cd $(DC) && ( \
[3260]76          md5sum `find . -type f -not -path "./inc/digest" -not -path "./cache/*" -not -path "./var/*" -not -path "./db/*" -not -path ./CHANGELOG` \
[0]77          > inc/digests \
78     )
[2537]79
[0]80     touch config-stamp
81
82dist: config dist-tgz dist-zip dist-l10n
83
84deb:
[1581]85     cp ./README.md debian/README
[0]86     dpkg-buildpackage -rfakeroot
87
88dist-tgz:
89     [ -f config-stamp ]
90     cd $(DIST) && tar cfz dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).tar.gz ./dotclear
91
92dist-zip:
93     [ -f config-stamp ]
94     cd $(DIST) && zip -r9 dotclear-$$(grep DC_VERSION dotclear/inc/prepend.php | cut -d"'" -f4).zip ./dotclear
95
96dist-l10n:
97     [ -f config-stamp ]
[2537]98
[0]99     rm -rf ./$(DIST)/l10n
100     mkdir -p ./$(DIST)/l10n
[2537]101
[0]102     find ./locales/ -maxdepth 1 -mindepth 1 -type d -not -name '.svn' -not -name '_pot' -not -name 'en' \
103     -exec cp -pRf \{\} ./$(DIST)/l10n/ \;
[2537]104
[0]105     find ./$(DIST)/l10n -type d -name '.svn' | xargs rm -rf
106     ./build-tools/make-l10n.php ./$(DIST)/l10n/
[2537]107
[0]108     cd ./$(DIST)/l10n && for i in *; do \
109          zip -r9 "$$i-$$(grep DC_VERSION ../dotclear/inc/prepend.php | cut -d"'" -f4).zip" "$$i"; \
110          rm -rf "$$i"; \
111     done
[2537]112
[0]113
114clean:
[2558]115     rm -rf $(DIST) config-stamp
[0]116
117
118## Modules (Themes and Plugins) ###############################################
119pack-tool:
120     [ "$(ipath)" != '' ]
121     [ "$(iname)" != '' ]
122     [ "$(iname)" != '' ]
123     [ -d $(ipath)/$(iname) ]
[2537]124
125
[2615]126copy-plugins: clean
Note: See TracBrowser for help on using the repository browser.

Sites map