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

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

added makefile option for site GWS

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