File tree 4 files changed +54
-0
lines changed
4 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,6 @@ indent_size = 2
9
9
indent_style = space
10
10
insert_final_newline = true
11
11
trim_trailing_whitespace = true
12
+
13
+ [Makefile ]
14
+ indent_style = tab
Original file line number Diff line number Diff line change
1
+ .PHONY : test_compile test_rules test check clean distclean
2
+
3
+ XSLTPROC = xsltproc
4
+ XSPEC = xspec.sh
5
+
6
+ bibframe2marc.xsl : rules.xml
7
+ $(XSLTPROC ) src/compile.xsl rules.xml > bibframe2marc.xsl
8
+
9
+ rules.xml : $(shell find rules)
10
+ ./buildrules.sh
11
+
12
+ test_compile :
13
+ $(XSPEC ) test/compile.xspec
14
+
15
+ test_rules : bibframe2marc.xsl
16
+ $(XSPEC ) rules/test/rules.xspec
17
+
18
+ test : test_compile test_rules
19
+
20
+ check : test
21
+
22
+ clean :
23
+ -rm rules.xml bibframe2marc.xsl
24
+
25
+ distclean : clean
26
+ -find . -name " xspec" | xargs rm -r
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # Generate a rules.xml file from the xml files in the rules/ directory
4
+
5
+ if [ " $1 " = " " ]; then
6
+ RULES_FILE=rules.xml
7
+ else
8
+ RULES_FILE=$1
9
+ fi
10
+
11
+ if [ -r rules/VERSION ]; then
12
+ VERSION=` cat rules/VERSION`
13
+ fi
14
+
15
+ echo " <rules xmlns=\" http://www.loc.gov/bf2marc\" >" > $RULES_FILE
16
+ if [ " $VERSION " != " " ]; then
17
+ echo " <version>$VERSION </version>" >> $RULES_FILE
18
+ fi
19
+
20
+ for filename in rules/* .xml; do
21
+ echo " <file>$filename </file>" >> $RULES_FILE
22
+ done
23
+
24
+ echo " </rules>" >> $RULES_FILE
Original file line number Diff line number Diff line change
1
+ 0.1.0-SNAPSHOT
You can’t perform that action at this time.
0 commit comments