Fix the build
authorJelmer Vernooij <jelmer@samba.org>
Thu, 10 Mar 2005 12:51:11 +0000 (13:51 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 10 Mar 2005 12:51:11 +0000 (13:51 +0100)
Makefile
ptb2ly.c
ptb2xml.c
tests/Makefile

index a44fe7c3abe8b2d59df83645243b13385cd4cac3..efa8773b688c951e8986195b52f9c71d72c87543 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ install: all
        $(INSTALL) -d $(DESTDIR)$(datadir)
        $(INSTALL) -m 644 ptbxml2musicxml.xsl $(DESTDIR)$(datadir)
 
-test:
+test: all ptb2ptb
        $(MAKE) -C tests
 
 ctags: tags
index 03bf7f360edc654791ba8615ca07c2157bde56b1..5928db43b797f3bb0bddbcce84ba514213c51f20 100644 (file)
--- a/ptb2ly.c
+++ b/ptb2ly.c
@@ -276,10 +276,6 @@ void ly_write_staff_identifier(FILE *out, struct ptb_staff *s, struct ptb_sectio
 {
        int i;
 
-       if (warn_unsupported && s->musicbars) {
-               fprintf(stderr, "Warning: Ignoring musicbars\n");
-       }
-
        fprintf(out, "\n%% Notes for section %d, staff %d\n", section_num, staff_num);
        fprintf(out, "%s = {\n", get_staff_name(section_num, staff_num));
        fprintf(out, "\t");
@@ -325,6 +321,8 @@ void ly_write_section_identifier(FILE *out, struct ptb_section *s, int section_n
        int staff_num = 0;
        struct ptb_staff *st = s->staffs;
 
+
+
        if (s->description) {
                fprintf(out, "\n%% %c: %s\n", s->letter, s->description);
        }
@@ -399,6 +397,10 @@ void ly_write_section_identifier(FILE *out, struct ptb_section *s, int section_n
                st = st->next;
                staff_num++;
        }
+
+       if (warn_unsupported && s->musicbars) {
+               fprintf(stderr, "Warning: Ignoring musicbars\n");
+       }
 }
 
 void ly_write_tabstaff(FILE *out, struct ptb_staff *s, struct ptb_section *section, int section_num, int staff_num) 
index 167f02457f6407b043d73aeaf87024ffa5a4fdb0..7b28c012fd8aa9d57f87e041829116d145700472 100644 (file)
--- a/ptb2xml.c
+++ b/ptb2xml.c
@@ -200,7 +200,6 @@ xmlNodePtr xml_write_staffs(struct ptb_staff *staffs)
 
                for(i = 0; i < 2; i++) 
                        xmlAddChild(xstaff, xml_write_positions(staff->positions[i]));
-               xmlAddChild(xstaff, xml_write_musicbars(staff->musicbars));
                
                staff = staff->next;
        }
@@ -258,6 +257,8 @@ xmlNodePtr xml_write_sections(struct ptb_section *sections)
                xmlAddChild(xsection, xml_write_directions(section->directions));
                xmlAddChild(xsection, xml_write_staffs(section->staffs));
 
+               xmlAddChild(xsection, xml_write_musicbars(section->musicbars));
+
                section = section->next;
        }
 
index ca5f42d1e674c0dac1345934f002297a466002a0..b6f7f56c2e7e6b12219a7678929b285fd7da5bc9 100644 (file)
@@ -18,6 +18,11 @@ PTB_TESTFILES = $(wildcard *.ptb)
 %.pdf: %.ly
        lilypond-snapshot "$<"
 
-all: $(patsubst %.ptb,%.info,$(PTB_TESTFILES))
+%.ptb.2: %.ptb
+       ../ptb2ptb "$<"
+
+all: ptb info
+info: $(patsubst %.ptb,%.info,$(PTB_TESTFILES))
+ptb: $(patsubst %.ptb,%.ptb.2,$(PTB_TESTFILES))
 clean: 
        rm -f *.info *.ly *.txt *.pdf