
gmetadom_module = gdome_cpp_smart

AUTO_HH = \
  GdomeSmartDOMChar.hh \
  GdomeSmartDOMGdomeStringAux.hh \
  GdomeSmartDOMDOMString.hh \
  GdomeSmartDOMDOMStringAux.hh \
  GdomeSmartDOMDOMException.hh \
  GdomeSmartDOMDOMTimeStamp.hh \
  GdomeSmartDOMNode.hh \
  GdomeSmartDOMNodeList.hh \
  GdomeSmartDOMNamedNodeMap.hh \
  GdomeSmartDOMCharacterData.hh \
  GdomeSmartDOMAttr.hh \
  GdomeSmartDOMElement.hh \
  GdomeSmartDOMText.hh \
  GdomeSmartDOMComment.hh \
  GdomeSmartDOMCDATASection.hh \
  GdomeSmartDOMDocumentType.hh \
  GdomeSmartDOMNotation.hh \
  GdomeSmartDOMEntity.hh \
  GdomeSmartDOMEntityReference.hh \
  GdomeSmartDOMProcessingInstruction.hh \
  GdomeSmartDOMDocumentFragment.hh \
  GdomeSmartDOMDocument.hh \
  GdomeSmartDOMEventTarget.hh \
  GdomeSmartDOMEvent.hh \
  GdomeSmartDOMMutationEvent.hh

headers = \
  GdomeSmartDOM.hh \
  GdomeSmartDOMDOMImplementation.hh \
  GdomeSmartDOMBasic.hh \
  GdomeSmartDOMCore.hh \
  GdomeSmartDOMEvents.hh \
  GdomeSmartDOMHelper.hh \
  GdomeSmartDOMEventListener.hh \
  $(AUTO_HH)

EXTRA_DIST = $(headers)

BUILT_SOURCES = $(AUTO_HH)

CLEANFILES = $(AUTO_HH)

XML2HH = $(srcdir)/../xsl/xml2hh.xsl

if HAVE_SED_COND

GdomeSmartDOM%.hh: $(top_srcdir)/src/shared/%.hh.in
	$(SED) s/@DOM_NAMESPACE@/GdomeSmartDOM/ <$< >$@

endif

$(AUTO_HH) : $(XML2HH)

if HAVE_XSLTPROC_COND

GdomeSmartDOM%.hh : $(top_srcdir)/xml/DOM/Core/%.xml
	$(XSLTPROC) --param uriprefix "'$(top_srcdir)/xml/DOM/Core'" $(XML2HH) $< >$@

GdomeSmartDOM%.hh : $(top_srcdir)/xml/DOM/Events/%.xml
	$(XSLTPROC) --param module "'Events'" \
		    --param uriprefix "'$(top_srcdir)/xml/DOM/Events'" \
		    $(XML2HH) $< >$@

endif

install-data-local:
	@echo "Installing in $(DESTDIR)$(pkgincludedir)/$(gmetadom_module)..."; \
	for f in $(headers); do \
		$(mkinstalldirs) $(DESTDIR)$(pkgincludedir)/$(gmetadom_module); \
		if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \
		echo "$$f"; \
		$(INSTALL_DATA) $$p $(DESTDIR)$(pkgincludedir)/$(gmetadom_module)/$$f; \
	done

uninstall-local:
	@echo "Removing $(DESTDIR)$(pkgincludedir)/$(gmetadom_module)"; \
	rm -rf $(DESTDIR)$(pkgincludedir)/$(gmetadom_module)

