#!/usr/bin/make -f # file : anonymous-output/Makefile # author : Jeroen N. Witmond # copyright : not copyrighted - public domain # Test xsd's handling of restrictions based on anyType. # File w3.org-xml-1998.xsd was downloaded from # http://www.w3.org/2001/xml.xsd on 2006-12-22 16:44 CET. It is # referenced only by xsd generating code for the client Schema. # WARNING: See the comment for target clean below for the conventions # for source file names. #################################### # Use XSD_PREFIX to specify where xsd is installed or extracted. # For xsd version 2.3.0: #XSD_PREFIX=/home/bahco/Sandbox/xsd_2.3.0 # For xsd version 3.0.0: #XSD_PREFIX= # The values below may depend on your installation / distribution. #XSD=$(XSD_PREFIX)/usr/bin/xsd #XSD_INCLUDE=$(XSD_PREFIX)/usr/include # You are urged to `make clean` before changing any of the values # above. #################################### # # For xsd-3.1.0.a1-i686-linux-gnu: # XSD_PREFIX=/home/bahco/Sandbox/xsd-3.1.0.a1-i686-linux-gnu XSD=$(XSD_PREFIX)/bin/xsd XSD_INCLUDE=$(XSD_PREFIX)/libxsd # #################################### XSD_CHARTYPE = --char-type wchar_t XSD_GENERATES = --generate-ostream XSD_LONG = --custom-type long=int64_t --custom-type unsignedLong=uint64_t --custom-type integer=int64_t CPPFLAGS = -Wall -W -I$(XSD_INCLUDE) CXXFLAGS = -g LDLIBS = -lxerces-c ### # The default target for make: Try to compile the generated code. all: restrict-base-anytype.o # Generate XmlSchema.hxx only when needed, not every time. XmlSchema.xsd: echo "Dummy file which serves as timestap for make. It was generated on `date`." > $@ # We need an XmlSchema.hxx without 'long long' typedefs, to get g++ # -pedantic to shut up. XmlSchema.hxx: XmlSchema.xsd $(XSD) cxx-tree \ $(XSD_CHARTYPE) \ $(XSD_LONG) \ --generate-xml-schema \ $< ### # Generate code for the client Schema, restrict-base-anytype.xsd. restrict-base-anytype.cxx restrict-base-anytype.hxx: restrict-base-anytype.xsd XmlSchema.xsd $(XSD) cxx-tree \ $(XSD_CHARTYPE) \ $(XSD_LONG) \ $(XSD_GENERATES) \ --extern-xml-schema XmlSchema.xsd \ $< ### # Compile and link all code. HEADERS = restrict-base-anytype.hxx XmlSchema.hxx restrict-base-anytype.o: restrict-base-anytype.cxx $(HEADERS) $(COMPILE.cc) $(OUTPUT_OPTION) $< ### # Utility targets. ### ### # WARNING: Use extensions .cpp and .hpp for manually crafted # files. Extensions .?xx are reserved for generated files, WHICH ARE # REMOVED HERE. clean: -rm XmlSchema.xsd \ *.?xx *.o .PHONY: all clean