Next / Previous / Contents / TCC Help System / NM Tech homepage

3. Setting up Makefile rules for pyrang

The Unix make utility is very handy if your schema is written in RNC format. This rule in your Makefile will rebuild the .rng file from the .rnc, if needed, whenever you type the make command:

F.rng: F.rnc
     trang F.rnc F.rng

Here's a complete example. Suppose your reference schema is roster.rnc, and further suppose your Python script expects the manifest constants to live in a file named, and each constant starts with the string “RNC_”. These Makefile rules would rebuild the manifest constants:

roster.rng: roster.rnc
     trang roster.rnc roster.rng roster.rng
     pyrang -p RNC_ -o $@ $<