Makefile
branchv_0
changeset 25 8da11cce2c98
parent 20 fb939d9baaf4
child 27 413a00a9cde7
equal deleted inserted replaced
24:2cbf4c472a67 25:8da11cce2c98
    11 # GNU General Public License for more details.
    11 # GNU General Public License for more details.
    12 #
    12 #
    13 # You should have received a copy of the GNU General Public License
    13 # You should have received a copy of the GNU General Public License
    14 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
    14 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
    15 
    15 
       
    16 all: validate xhtml txt
       
    17 
    16 validate:
    18 validate:
    17 	xmllint --noout --schema ssm.xsd ssm.en.xml
    19 	xmllint --noout --schema schema/ssm.xsd text/ssm.en.xml
       
    20 
    18 xhtml:
    21 xhtml:
    19 	xsltproc --output ssm.en.xhtml --nonet ssm.xsl ssm.en.xml
    22 	mkdir -p build
       
    23 	xsltproc --output build/index.xhtml --nonet templates/ssm.xhtml.xsl text/ssm.en.xml
       
    24 	cp templates/*.css build
       
    25 
       
    26 # TODO: better line wrapping
       
    27 txt:
       
    28 	mkdir -p build
       
    29 	xsltproc --nonet templates/ssm.txt.xsl text/ssm.en.xml | fmt -w 74 -s | sed -E 's/(  +)([^- ])/\1  \2/g' > build/ssm.en.txt
    20 
    30 
    21 clean:
    31 clean:
    22 	rm -f ssm.en.xhtml
    32 	rm -rf build
    23 
    33 
    24 publish:
    34 publish:
    25 	scp ssm.en.xhtml globalcode.info:/var/www/sane-software.globalcode.info/v_0/index.xhtml
    35 	scp build/* globalcode.info:/var/www/sane-software.globalcode.info/v_0/
    26 	scp style.css    globalcode.info:/var/www/sane-software.globalcode.info/v_0/
       
    27 
    36 
    28 
    37 
    29 # Prints a table with number of items in particular chapters:
    38 # Prints a table with number of items in particular chapters:
    30 statistics:
    39 statistics:
    31 	cat ssm.en.xml \
    40 	cat ssm.en.xml \