From: William D. <wdo...@us...> - 2005-03-18 22:11:07
|
Update of /cvsroot/flexml/flexml/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22016 Modified Files: Makefile Log Message: Remove cruft; name/use flexml executable built in ../ in default rules; remove unnecessary dependencies on ../skel; use FleXML.xml (newly checked in) not .html. Index: Makefile =================================================================== RCS file: /cvsroot/flexml/flexml/examples/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 15 Feb 2005 19:35:25 -0000 1.3 +++ Makefile 18 Mar 2005 22:10:52 -0000 1.4 @@ -53,7 +53,9 @@ test:: all @echo "Testing..." + # DEFAULT RULES. +FLEXML_PROG = ../$(FLEXML) # Generate C source from flex scanner. %.c: %.l @@ -62,44 +64,19 @@ # Direct generation of stand-alone XML processor+application. # Note: The dependency must be of the form "appl.l: appl.act proc.dtd". %.l: %.act - ../flexml.pl $(FLEXDEBUG) -vA -a $^ + $(FLEXML_PROG) $(FLEXDEBUG) -vA -a $^ # Generate XML processor to link with application. -%.l %.h: %.dtd ../skel - ../flexml.pl $(FLEXDEBUG) -v -s ../skel $< +%.l %.h: %.dtd + $(FLEXML_PROG) $(FLEXDEBUG) -v $< # Generate XML application C source to compile and link with processor. # Note: The dependency must be of the form "appl.c: appl.act proc.dtd". %.c: %.act - ../flexml.pl $(FLEXDEBUG) -vD -a $^ - - -# MAIN PROGRAM. - -clean::; $(RM) flexml flexml-act flexml-act.c - -flexml: flexml.pl - sed -e "s;^[#][!].*perl;#!$(PERL);" \ - -e "s;[.][/]flexml-act;$(ACT);g" \ - -e "s;[.][/]skel;$(SKEL);g" \ - -e "s;/var/tmp;$(TMPDIR);g" \ - -e "s;/usr/share/doc/;$(DOCDIR)/;g" flexml.pl >flexml - chmod +x flexml - -# Action language... -flexml-act.l: flexml-act.dtd ../skel - ../flexml.pl $(FLEXDEBUG) -Lv -ractions -s ../skel $< - -flexml-act.c: flexml-act.l - $(FLEX) -B -s -v -oflexml-act.c flexml-act.l - -flexml-act.o: flexml-act.c flexml-act.h -flexml-act-bootstrap.o: flexml-act-bootstrap.c flexml-act.h -flexml-act: flexml-act.o flexml-act-bootstrap.o + $(FLEXML_PROG) $(FLEXDEBUG) -vD -a $^ -# DOCUMENTS. -# TESTS. +clean::; $(RM) flexml-act flexml-act.c # Example: LINK processor with application: @@ -131,15 +108,13 @@ clean::; $(RM) tricky.[lco] tricky # Complex example: application to print XHTML <a href=...> values. -# XHTML is big, so...we must use a patched flex (included in Debian). - xhtml1-transitional.dtd: wget 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd' -xhtml1-transitional.l xhtml1-transitional.h: xhtml1-transitional.dtd ../skel - ./flexml.pl $(FLEXDEBUG) -s../skel -rhtml \ - -p "-//W3C//DTD XHTML 1.0 Transitional//EN" \ +xhtml1-transitional.l xhtml1-transitional.h: xhtml1-transitional.dtd + ../$(FLEXML) $(FLEXDEBUG) -rhtml \ + -p "-//IETF//DTD XHTML 1.0 Transitional//EN" \ -u "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" \ xhtml1-transitional.dtd @@ -152,9 +127,9 @@ xhtml-href.o: xhtml-href.c xhtml1-transitional.h xhtml-href: xhtml-href.o xhtml1-transitional.o -test:: xhtml-href +test:: xhtml-href FleXML.xml ./xhtml-href <test.html - ./xhtml-href <FleXML.html + ./xhtml-href < FleXML.xml clean::; $(RM) xhtml1-*.dtd xhtml1-*.[lhco] xhtml-href.[co] xhtml-href @@ -162,3 +137,10 @@ clean::; @echo "Done cleaning." test::; @echo "Done testing." + +.PHONEY : echov + +# on command line say 'make v=foo echov' to see the value +# of the variable foo +echov: + @echo "$(subst ",\",$($(v)))"; #"# for emacs |