[Xcb] slight OT: Makefile.am question

Thomas Hunger hto at arcor.de
Sat Jun 2 10:58:49 PDT 2007


Hello,

I have a problem in Makefile.am which I could not solve in an elegant 
way myself. Instead of linking the protocol XML files before 
generation I call xmllint to validate them:

$(EXTENSION_XML):
	$(XMLLINT) --relaxng $(RELAXNG_SCHEMA) -o $@ 
$(XCBPROTO_XCBINCLUDEDIR)/$@

In another place the generator is called like this:

.xml.c: 
	$(srcdir)/c_client.py $<

Now the dependency checking of make ensures that each XML file is 
validated & copied right before it is needed. It cannot check the 
implicit dependencies which come from the <import/> statements 
though. E.g. "render.xml" depends on "xproto.xml". I could do this:

render.xml: xproto.xml
composite.xml: xproto.xml xfixes.xml

etc.

Right now I use the following hack which of course gives many warnings 
because there are recursive dependencies:

$(EXTENSION_XML): $(EXTENSION_XML)

What I would like to achieve is the validation of _all_ xml files 
before the generator is called the first time. Is this possible?

Thanks
Tom


More information about the Xcb mailing list