[xsd-users] Makefile rules.

Bill Pringlemeir bpringle at sympatico.ca
Thu Dec 4 14:05:20 EST 2008


I use the following steps an automatic depends for XSD code
generation,

The steps are,

1. For each schema create a make variable denoting schema depends
keyed to the filename.
   a) the schema always depends on itself.
   b) scan the schema for schemaLocation, extract the file name and
      add the *make variable* for that schema.

After this step, the make variables will expand to complete the schema
depends.  Schemas files should have a DAG structure so the make
variable should not be recursive.

2. Create an empty rule so that make doesn't try to recreate schemas.

3. Make all source, headers and inline files dependant on the schema
   variable.

This seems to work well.  I think that it is dependant on our use of
'include' within the schema, but I think it could be extended to
create code generation rules for most systems.

fwiw,
Bill Pringlemeir.




More information about the xsd-users mailing list