Dotclear

Changeset 2558:31f1ca134823


Ignore:
Timestamp:
11/15/13 16:39:24 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
2.6
Children:
2559:2901695f9a58, 2560:4ce25b2f2f5f
Message:

Improve Makefile to removed unnecessayery files and directories (tests, _dist, ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r2539 r2558  
     1.PHONY: config-stamp 
     2 
    13SHELL=/bin/sh 
    2  
    34DIST=_dist 
    45DC=$(DIST)/dotclear 
     
    78     @echo "make config or make dist" 
    89 
    9 config: 
     10config: clean config-stamp 
    1011     mkdir -p ./$(DC) 
    1112 
    1213     ## Copy needed folders and files 
    13      cp -pRf ./admin ./inc ./themes ./index.php ./CHANGELOG ./CREDITS ./LICENSE ./README.md ./CONTRIBUTING.md ./$(DC)/ 
     14     cp -pRf ./admin ./inc ./index.php ./CHANGELOG ./CREDITS ./LICENSE ./README.md ./CONTRIBUTING.md ./$(DC)/ 
    1415 
    1516     ## Locales directory 
     
    1718     cp -pRf ./locales/README ./locales/en ./locales/fr ./$(DC)/locales/ 
    1819 
     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 
    1925     ## 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 .hg* files and folders 
    29      find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf 
    30      find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf 
     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/ 
    3130 
    3231     ## Remove config file if any 
    3332     rm -f ./$(DC)/inc/config.php 
     33 
     34     ## Copy built-in themes 
     35     cp -pRf \ 
     36     ./themes/default \ 
     37     ./themes/blueSilence \ 
     38     ./themes/customCSS \ 
     39     ./themes/ductile \ 
     40     ./$(DC)/themes/ 
    3441 
    3542     ## Copy built-in plugins 
     
    5461     ./$(DC)/plugins/ 
    5562 
    56      ## Remove .svn folders 
    57      find ./$(DIST)/ -type d -name '.svn' -print0 | xargs -0 rm -rf 
    58  
    59      ## Remove .hg* files and folders 
    60      find ./$(DIST)/ -type d -name '.hg*' | xargs rm -rf 
    61      find ./$(DIST)/ -type f -name '.hg*' | xargs rm -rf 
    62  
    6363     ## "Compile" .po files 
    6464     ./build-tools/make-l10n.php ./$(DC)/ 
     
    7575     ## Debug off 
    7676     perl -pi -e "s|^//\*== DC_DEBUG|/*== DC_DEBUG|sgi;" $(DC)/inc/prepend.php $(DC)/inc/prepend.php 
     77 
     78     ## Remove scm files and folders from DC and CB 
     79     find ./$(DIST)/ -type d -name '.svn' | xargs -r rm -rf 
     80     find ./$(DIST)/ -type d -name '.hg'  | xargs -r rm -rf 
     81     find ./$(DIST)/ -type d -name '.git' | xargs -r rm -rf 
     82     find ./$(DIST)/ -type f -name '.*ignore' | xargs -r rm -rf 
    7783 
    7884     ## Create digest 
     
    117123 
    118124clean: 
    119      [ -f config-stamp ] 
    120      rm -rf $(DIST) 
    121      rm -f config-stamp build-stamp configure-stamp 
     125     rm -rf $(DIST) config-stamp 
    122126 
    123127 
Note: See TracChangeset for help on using the changeset viewer.

Sites map