source: CMIP6dreqbuild/trunk/src/framework/Makefile @ 724

Subversion URL: http://proj.badc.rl.ac.uk/svn/exarch/CMIP6dreqbuild/trunk/src/framework/Makefile@724
Revision 724, 4.8 KB checked in by mjuckes, 4 years ago (diff)

check

Line 
1
2
3targ ?= dreq
4fmt ?= txt
5www ?= /var/www/f
6
7
8.PHONY: config checkSamp schema checkSchema
9
10config: out/$(targ)Sample.xml out/$(targ)Defn.xml checkSamp
11
12configV: out/vocabSample.xml out/vocabDefn.xml checkVSamp
13
14configu: out/dreqUpdSample.xml out/dreqUpdDefn.xml checkSampU
15
16out/dreqUpdSample.xml: ../../docs/dreq.txt ptxt.py
17        python ptxt.py -f dreq.txt updsamp
18
19out/dreqUpdDefn.xml: ../../docs/dreq.txt ptxt.py
20        python ptxt.py -f dreq.txt upd
21
22out/$(targ)Sample.xml: ../../docs/$(targ).$(fmt) ptxt.py   dreqPy/packageConfig.py
23        python ptxt.py -f $(targ).$(fmt) samp
24
25out/$(targ)Defn.xml: ../../docs/$(targ).$(fmt) ptxt.py
26        python ptxt.py -f $(targ).$(fmt) defn
27
28out/vocabSample.xml: ../../docs/vocab.txt ptxt.py
29        python ptxt.py -f vocab.txt samp
30
31out/vocabDefn.xml: ../../docs/vocab.txt ptxt.py
32        python ptxt.py -f vocab.txt defn
33
34checkVSamp:
35        xmllint --noout --schema out/vocabFrameworkSchema.xsd out/vocabDefn.xml
36
37checkSamp:
38        xmllint --noout --schema out/vocabFrameworkSchema.xsd out/$(targ)Defn.xml
39
40checkSampU:
41        xmllint --noout --schema out/vocabFrameworkSchema.xsd out/dreqUpdDefn.xml
42
43schema: config out/$(targ)Schema.xsd checkSchema
44
45schemaV: configV out/vocabSchema.xsd checkSchemaV
46
47xsd: ../../docs/xlst_xdsSchemaGen.xml config  out/$(targ)Defn.xml
48        xsltproc ../../docs/xlst_xdsSchemaGen.xml out/$(targ)Defn.xml > out/$(targ)Schema.xsd
49
50out/vocabSchema.xsd: ../../docs/xlst_xdsSchemaGen.xml configV  out/vocabDefn.xml
51        xsltproc ../../docs/xlst_xdsSchemaGen.xml out/vocabDefn.xml > out/vocabSchema.xsd
52
53checkSchema:
54        xmllint --noout --schema out/$(targ)Schema.xsd out/$(targ)Sample.xml
55
56checkSchemaV:
57        xmllint --noout --schema out/vocabSchema.xsd out/vocabSample.xml
58
59distrib: out/dreq2Defn.xml  out/dreq2Sample.xml  out/dreq2Schema.xsd
60        cp  out/dreq2Defn.xml  out/dreq2Sample.xml  out/dreq2Schema.xsd  out/vocabFrameworkSchema.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs
61        cp  out/vocabDefn.xml  out/vocabSample.xml  out/vocabSchema.xsd vocab.xml  /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs
62        echo "docs copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs"
63        bash seddreq.sh annotated_20150731.xml dreq.xml dreqPy/dreq.py >  /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/dreq.py
64        bash seddreq02.sh "\.\.\/out" "docs" dreqPy/packageConfig.py > /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/packageConfig.py
65        cp htmlTemplates.py dreqPy/scope.py dreqPy/scope_utils.py dreqPy/utilities.py dreqPy/utilP2.py dreqPy/utilP3.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy   
66        cp dreqPy/dreqCmdl.py dreqPy/makeTables.py dreqPy/vrev.py dreqPy/__init__.py dreqPy/simpleCheck.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy
67        cp dreqPy/misc_utils.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy
68        cp vocabDemo.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy   
69        cp compare.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/   
70        cp out/annotated_20150731_chk.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreq.xml
71        ### cp LICENSE README.txt setup.py setup.cfg /data/tmp/svn3/exarch/CMIP6dreq/trunk/
72        cp dreqPy/tables/test.xlsx /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/CMIP6_MIP_tables.xlsx
73        cp out/dc1.xsd out/xlink.xsd out/xml.xsd out/pav.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
74        cp out/dreqSuppSchema.xsd out/dreqSuppDefn.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
75        cp out/supplement_20150731.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreqSupp.xml
76        cp out/dreqManifest_dist.txt /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreqManifest.txt
77        cp -r dreqPy/examples /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/
78        cp out/BlockSchema.csv /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
79        echo "source copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy"
80
81dirs:
82        mkdir -p html html/index  html/t  html/u tab2 tabs03  html/tt
83
84localHtml:
85        cp -r dreqPy/xls/* $(www)/data/tabs02/
86        cp -r dreqPy/tabs03/* $(www)/tabs03/
87        cp dreqPy/tab01_1_1.html dreqPy/tab01_3_3.html $(www)/
88        cp dreqPy/data3.js $(www)/data/mipVarsData.js
89        cp websiteExtras/dreq.css $(www)/css
90        cp -r dreqPy/html/u/* $(www)/u/
91        cp -r dreqPy/html/t/* $(www)/t/
92        cp -r dreqPy/html/index/* $(www)/index/
93        cp -r dreqPy/html/index.html $(www)/
94
95cleanLocalHtml:
96        cp -r dreqPy/xls/* $(www)/data/tabs02/
97        cp -r dreqPy/tabs03/* $(www)/tabs03/
98        cp dreqPy/tab01_1_1.html dreqPy/tab01_3_3.html $(www)/
99        cp dreqPy/data3.js $(www)/data/mipVarsData.js
100        cp websiteExtras/dreq.css $(www)/css
101        mv $(www)/u/ $(www)/u1
102        cp -r dreqPy/html/u $(www)/
103        mv $(www)/t/ $(www)/t1
104        cp -r dreqPy/html/t $(www)/
105        cp -r dreqPy/html/index/* $(www)/index/
106        cp -r dreqPy/html/index.html $(www)/
107        echo clearing up ... may take some time
108        find  $(www)/u1 -name "*.html" -exec rm {} \;
109        find  $(www)/t1 -name "*.html" -exec rm {} \;
110        rmdir $(www)/u1
111        rmdir $(www)/t1
112
113cleanHtml:
114        find dreqPy/html/u -type f -exec rm {} \;
115        rm dreqPy/html/t/* dreqPy/html/tt/*
116        find /var/www/f/u -type f -exec rm {} \;
117        rm /var/www/f/t/*
118
119sHtml:
120        zip -r html.zip data2.js html
121
Note: See TracBrowser for help on using the repository browser.