-$(eval $(call docbook,docs/users_guide,users_guide))
-
-# Hack: dblatex normalises the name of the input file using
-# os.path.realpath, which means that if we're in a linked build tree,
-# it won't be able to find ug-book.xml which is in the build tree but
-# not in the source tree. Hence, we copy ug-book.xml to the source
-# tree. This is a horrible hack, but I can't find a better way to do
-# it --SDM (2009-05-11)
+# sort remove duplicates
+docs/users_guide_DOCBOOK_SOURCES := \
+ $(sort $(docs/users_guide_GENERATED_DOCBOOK_SOURCES) \
+ $(wildcard docs/users_guide/*.xml) \
+ $(basename $(wildcard docs/users_guide/*.xml.in)))