Annotation of CSS/CSS2.1-test-suite/Makefile, revision 1.14

1.1       ihickson    1: all:
1.4       ihickson    2:        #
1.3       ihickson    3:        # empty staging area
1.4       ihickson    4:        #
1.3       ihickson    5:        rm -rf tests/
                      6:        mkdir tests
1.4       ihickson    7:        #
1.3       ihickson    8:        # take raw and cooked tests and place them in staging area, along with support files
1.4       ihickson    9:        #
1.1       ihickson   10:        find raw-tests -name FILENAMES | xargs -n 1 perl make-proper-tests.pl
1.2       ihickson   11:        find cooked-tests -name '*.xht' | xargs -n 1 --replace cp -Lv {} tests
1.6       ihickson   12:        find cooked-tests/* -maxdepth 0 -type d -not -name CVS | xargs -n 1 perl -e 'if (-d "$$ARGV[0]/support") { print `cp -Lrvu "$$ARGV[0]/support" tests` }'
1.4       ihickson   13:        #
1.5       ihickson   14:        # nuke unused support files and CVS directories
1.4       ihickson   15:        #
1.1       ihickson   16:        rm -rf tests/support/.unused
1.2       ihickson   17:        find tests -type d -name CVS | xargs rm -rf
1.4       ihickson   18:        #
1.14    ! fantasai   19:        # preprocess tests as necessary
        !            20:        #
        !            21:        egrep -l '&\w+;' tests/*.xht | xargs perl -pi -e 'use HTML::Entities::Numbered;' -e '$$_ = name2decimal_xml($$_)'
        !            22:        #
1.3       ihickson   23:        # empty distribution area
1.4       ihickson   24:        #
1.1       ihickson   25:        rm -rf dist/
                     26:        mkdir dist
1.8       fantasai   27:        mkdir dist/html4
                     28:        mkdir dist/xhtml1
                     29:        mkdir dist/xhtml1print
1.4       ihickson   30:        #
1.12      fantasai   31:        # indexes and htaccess
1.9       fantasai   32:        #
                     33:        perl catalog.pl tests/*.xht
                     34:        cp data/indices.css dist/indices.css
1.10      fantasai   35:        cp data/index.xht dist/index.xht
                     36:        cp data/index.html dist/index.html
1.12      fantasai   37:        cp data/htaccess dist/.htaccess
1.9       fantasai   38:        #
1.3       ihickson   39:        # generate the tests in all supported formats, along with support files
1.4       ihickson   40:        #
1.1       ihickson   41:        perl generate.pl tests/*.xht
1.9       fantasai   42:        perl -pi -e 's/\.xht/\.htm/g' dist/html4/by-section.htm
1.8       fantasai   43:        cp -Lrv tests/support dist/html4/support
                     44:        cp -Lrv tests/support dist/xhtml1/support
                     45:        cp -Lrv tests/support dist/xhtml1print/support
1.11      fantasai   46:         # PNG->JPEG conversion requires ImageMagick's 'convert' tool
1.13      bbos       47:        find dist/xhtml1print/support -iname '*.png' | xargs -iFILENAME convert FILENAME -background white -flatten -quality 90 -interlace none FILENAME.jpg
1.8       fantasai   48:        find dist/xhtml1print/support -iname '*.png.jpg' | xargs rename s/png.jpg/jpg/
                     49:        find dist/xhtml1print/support -iname '*.png' | xargs rm -rf
                     50:        find dist/xhtml1print -iname '*.xht' -o -iname '*.css' | xargs perl -pi -e 's/\.png/\.jpg/g'
1.4       ihickson   51:        #
1.3       ihickson   52:        # empty staging area again
1.4       ihickson   53:        #
1.3       ihickson   54:        rm -rf tests/
1.4       ihickson   55:        #
1.3       ihickson   56:        # report number of tests now included (XHTML1.1 variants only)
1.4       ihickson   57:        #
1.8       fantasai   58:        ls dist/xhtml1/*.xht | wc -l

Webmaster