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

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

cleaned examples and import structure

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/utilP3.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy     
66        cp dreqPy/utilP2/*.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/utilP2/
67        cp dreqPy/dreqCmdl.py dreqPy/makeTables.py dreqPy/vrev.py dreqPy/fgrid.py dreqPy/overviewTabs.py dreqPy/volsum.py dreqPy/__init__.py dreqPy/simpleCheck.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy
68        cp dreqPy/misc_utils.py dreqPy/table_utils.py dreqPy/rvgExtraTable.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy
69        cp vocabDemo.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy   
70        cp compare.py /data/tmp/svn3/exarch/CMIP6dreq/trunk/   
71        cp out/annotated_20150731_chk.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreq.xml
72        ### cp LICENSE README.txt setup.py setup.cfg /data/tmp/svn3/exarch/CMIP6dreq/trunk/
73        cp dreqPy/tables/test.xlsx /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/CMIP6_MIP_tables.xlsx
74        cp out/dc1.xsd out/xlink.xsd out/xml.xsd out/pav.xsd /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
75        cp out/dreqSuppSchema.xsd out/dreqSuppDefn.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
76        cp out/supplement_20150731.xml /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreqSupp.xml
77        cp out/dreqManifest_dist.txt /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/dreqManifest.txt
78        cp out/md5Manifest.txt out/sfheadings.csv /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
79        cp -r dreqPy/examples /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/
80        cp out/BlockSchema.csv /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy/docs/
81        echo "source copied to /data/tmp/svn3/exarch/CMIP6dreq/trunk/dreqPy"
82
83dirs:
84        mkdir -p html html/index  html/t  html/u tab2 tabs03  html/tt
85
86localHtml:
87        cp -r dreqPy/xls/* $(www)/data/tabs02/
88        cp -r dreqPy/tabs03/* $(www)/tabs03/
89        cp dreqPy/tab01_1_1_dn.html dreqPy/tab01_1_1.html dreqPy/tab01_3_3.html $(www)/
90        cp dreqPy/data3.js $(www)/data/mipVarsData.js
91        cp websiteExtras/dreq.css $(www)/css
92        cp -r dreqPy/html/u/* $(www)/u/
93        cp -r dreqPy/html/t/* $(www)/t/
94        cp -r dreqPy/html/index/* $(www)/index/
95        cp -r dreqPy/html/index.html $(www)/
96
97cleanLocalHtml:
98        cp -r dreqPy/xls/* $(www)/data/tabs02/
99        cp -r dreqPy/tabs03/* $(www)/tabs03/
100        cp dreqPy/tab01_1_1.html dreqPy/tab01_3_3.html $(www)/
101        cp dreqPy/data3.js $(www)/data/mipVarsData.js
102        cp websiteExtras/dreq.css $(www)/css
103        mv $(www)/u/ $(www)/u1
104        cp -r dreqPy/html/u $(www)/
105        mv $(www)/t/ $(www)/t1
106        cp -r dreqPy/html/t $(www)/
107        cp -r dreqPy/html/index/* $(www)/index/
108        cp -r dreqPy/html/index.html $(www)/
109        echo clearing up ... may take some time
110        find  $(www)/u1 -name "*.html" -exec rm {} \;
111        find  $(www)/t1 -name "*.html" -exec rm {} \;
112        rmdir $(www)/u1
113        rmdir $(www)/t1
114
115cleanHtml:
116        find dreqPy/html/u -type f -exec rm {} \;
117        rm dreqPy/html/t/* dreqPy/html/tt/*
118        find /var/www/f/u -type f -exec rm {} \;
119        rm /var/www/f/t/*
120
121sHtml:
122        zip -r html.zip data2.js html
123
Note: See TracBrowser for help on using the repository browser.