[Nmc-wg] [ogf nmc-base svn commit] r15 - / examples schema util
svn at ogf.org
svn at ogf.org
Mon Mar 15 04:00:23 CDT 2010
Author: macfreek
Date: 2010-03-15 04:00:19 -0500 (Mon, 15 Mar 2010)
New Revision: 15
Modified:
Makefile
acknowledgements.tex
chain.dia
chain2.dia
chaining.tex
conclusion.tex
examples/echo1.xml
examples/echo2.xml
examples/echo3.xml
examples/echo4.xml
examples/request1.xml
examples/request2.xml
examples/request3.xml
examples/request4.xml
examples/request5.xml
examples/response1.xml
examples/response2.xml
examples/response3.xml
extension.tex
filter.dia
flow.dia
introduction.tex
messages.tex
motivation.tex
nmc-base.tex
result_codes.tex
schema/echo_ext.rnc
schema/echo_request.rnc
schema/echo_response.rnc
schema/request.rnc
schema/response.rnc
util/inline.pl
Log:
First a simple commit that fixes a few non-textual issues with the repository itself
- minor fix in util/inline.pl where re-use of $_ lead to "Use of uninitialized value" warnings
- duplicate label t:response_key -> t:response_datum
- duplicate label s:echo_protocol -> s:echo_protocol_architecture
- typo label s:response_message_analysis_messages -> s:response_message_analysis_message
- tune figure placement using \textfraction, \topfraction, \bottomfraction instead of [!h]. (yeah, figure placement sucks in LaTeX)
- Only use line feed as line break (previous file did mix CR and LF at different lines, quite odd! e.g. before and after "\section{Notational Conventions}" in nmc-base.tex).
- remove spurious character (0xc2) in echo3.xml and echo4.xml
- set svn:eol-style for all tex/xml sources
- remove svn:executable properties from .dia files
- I had some fun with the Makefile (removed the "pre" rule in favour of actual file dependencies and added rules to create the eps figures from the dia diagrams)
Modified: Makefile
===================================================================
--- Makefile 2010-02-23 22:31:15 UTC (rev 14)
+++ Makefile 2010-03-15 09:00:19 UTC (rev 15)
@@ -1,43 +1,43 @@
NAME=nmc-base
-GRAPHS=$(wildcard *.eps)
-FILES=$(wildcard *.tex)
+DIAGRAMS:=$(wildcard *.dia)
+GRAPHS:=$(subst .dia,.eps,$(DIAGRAMS)) # replace *.dia with *.eps
+
+# Determine .tex source files by examining the \input{file} in ${NAME}.tex
+TEXINCLUDE:=$(patsubst \input{%},%,$(shell grep -o "\\\\input{.*}" ${NAME}.tex))
+FILES:=$(foreach file,${TEXINCLUDE},$(addsuffix .tex,${file})) # add extension to files
+TEXGENERATED:=$(filter %_new.tex,$(FILES))
+
REFS=$(wildcard *.bib)
all: ${NAME}.pdf
-pre:
- util/inline.pl introduction.tex > introduction_new.tex
- util/inline.pl motivation.tex > motivation_new.tex
- util/inline.pl messages.tex > messages_new.tex
- util/inline.pl chaining.tex > chaining_new.tex
- util/inline.pl result_codes.tex > result_codes_new.tex
- util/inline.pl extension.tex > extension_new.tex
-
${NAME}.pdf: ${NAME}.tex ${GRAPHS} ${FILES} ${REFS}
- make pre
latex ${NAME}
bibtex ${NAME}
latex ${NAME}
latex ${NAME}
dvips ${NAME}.dvi -o ${NAME}.ps
ps2pdf ${NAME}.ps ${NAME}.pdf
-
+
+# mark target .ps as phony, to force this rule, even if the file is not out-of-date.
+# perhaps make -B would be more appropriate?
+.PHONY: ${NAME}.ps
${NAME}.ps:
latex ${NAME}.tex
bibtex ${NAME}
dvips ${NAME}.dvi -o ${NAME}.ps
# ps2pdf ${NAME}.ps
-.PHONY: ${NAME}.ps
+# Include XML sources in .tex files:
+# "util/inline.pl texfile.tex > texfile_new.tex"
+%_new.tex: %.tex
+ util/inline.pl $^ > $@
+
clean:
rm -f ${NAME}.ps ${NAME}.dvi *.bbl *.aux \
*.log *.blg *.ascii *.out *.toc
- rm -f messages_new.tex
- rm -f introduction_new.tex
- rm -f motivation_new.tex
- rm -f messages_new.tex
- rm -f chaining_new.tex
- rm -f result_codes_new.tex
- rm -f extension_new.tex
+ rm -f *_new.tex
+%.eps: %.dia
+ dia -t eps -e $@ $<
Property changes on: acknowledgements.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Property changes on: chain.dia
___________________________________________________________________
Name: svn:executable
- *
Property changes on: chain2.dia
___________________________________________________________________
Name: svn:executable
- *
Modified: chaining.tex
===================================================================
(Binary files differ)
Property changes on: chaining.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Property changes on: conclusion.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Property changes on: examples/echo1.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/echo2.xml
___________________________________________________________________
Name: svn:executable
- *
Modified: examples/echo3.xml
===================================================================
--- examples/echo3.xml 2010-02-23 22:31:15 UTC (rev 14)
+++ examples/echo3.xml 2010-03-15 09:00:19 UTC (rev 15)
@@ -3,13 +3,13 @@
type="EchoResponse"
id="message3"
messageIdRef="message1">
-
+
<metadata id="m1">
<nmwg:eventType>success.echo</nmwg:eventType>
</metadata>
-
+
<data id="d1" metadatIdRef="m1">
<nmwgr:datum>The echo request has passed.</nmwgr:datum>
</data>
-
+
</nmwg:message>
Property changes on: examples/echo3.xml
___________________________________________________________________
Name: svn:executable
- *
Modified: examples/echo4.xml
===================================================================
--- examples/echo4.xml 2010-02-23 22:31:15 UTC (rev 14)
+++ examples/echo4.xml 2010-03-15 09:00:19 UTC (rev 15)
@@ -1,13 +1,13 @@
<nmwg:message xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/"
type="EchoResponse" id="message4" messageIdRef="message2">
-
+
<metadata id="m1">
<nmwg:eventType>error.echo</nmwg:eventType>
</metadata>
-
+
<data id="d1" metadatIdRef="m1">
<nmwgr:datum>The echo request has failed.</nmwgr:datum>
</data>
-
+
</nmwg:message>
Property changes on: examples/echo4.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/request1.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/request2.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/request3.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/request4.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/request5.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/response1.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/response2.xml
___________________________________________________________________
Name: svn:executable
- *
Property changes on: examples/response3.xml
___________________________________________________________________
Name: svn:executable
- *
Modified: extension.tex
===================================================================
(Binary files differ)
Property changes on: extension.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Property changes on: filter.dia
___________________________________________________________________
Name: svn:executable
- *
Property changes on: flow.dia
___________________________________________________________________
Name: svn:executable
- *
Property changes on: introduction.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Modified: messages.tex
===================================================================
(Binary files differ)
Property changes on: messages.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Modified: motivation.tex
===================================================================
(Binary files differ)
Property changes on: motivation.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Modified: nmc-base.tex
===================================================================
(Binary files differ)
Property changes on: nmc-base.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Property changes on: result_codes.tex
___________________________________________________________________
Name: svn:eol-type
+ native
Name: svn:mime-type
+ application/x-latex
Property changes on: schema/echo_ext.rnc
___________________________________________________________________
Name: svn:executable
- *
Property changes on: schema/echo_request.rnc
___________________________________________________________________
Name: svn:executable
- *
Property changes on: schema/echo_response.rnc
___________________________________________________________________
Name: svn:executable
- *
Property changes on: schema/request.rnc
___________________________________________________________________
Name: svn:executable
- *
Property changes on: schema/response.rnc
___________________________________________________________________
Name: svn:executable
- *
Modified: util/inline.pl
===================================================================
--- util/inline.pl 2010-02-23 22:31:15 UTC (rev 14)
+++ util/inline.pl 2010-03-15 09:00:19 UTC (rev 15)
@@ -14,7 +14,7 @@
}
print "\n\# End Schema\n";
}
- if ($_ =~ m/^\%\s+INLINEXML=.*/) {
+ elsif ($_ =~ m/^\%\s+INLINEXML=.*/) {
my ($fn) = m/"(.*)"/;
open F, "< $fn";
print "<!-- Begin XML -->\n\n";
@@ -23,7 +23,7 @@
}
print "\n<!-- End XML -->\n";
}
- if ($_ =~ m/^\%\s+INLINE=.*/) {
+ elsif ($_ =~ m/^\%\s+INLINE=.*/) {
my ($fn) = m/"(.*)"/;
open F, "< $fn";
print "\# Begin \n\n";
More information about the Nmc-wg
mailing list