-surf/surfxml.l: surf/surfxml.dtd
- set -e; cd surf; flexml -b 1000000 -P surfxml -S -L surfxml.dtd
-../include/surf/surfxml.h: surf/surfxml.dtd
- cd ../include/surf; flexml -P surfxml -H -L ../../src/surf/surfxml.dtd
-xbt/graphxml.l: xbt/graphxml.dtd
- set -e; cd xbt; flexml -b 1000000 -P graphxml -S -L graphxml.dtd
-../include/xbt/graphxml.h: xbt/graphxml.dtd
- cd ../include/xbt; flexml -P graphxml -H -L ../../src/xbt/graphxml.dtd
+surf/surfxml.l: $(srcdir)/surf/surfxml.dtd
+ set -e; mkdir -p surf; flexml -b 1000000 -P surfxml --sysid=surfxml.dtd -S $@ -L $^
+$(top_srcdir)/include/surf/surfxml.h: $(srcdir)/surf/surfxml.dtd
+ set -e; flexml -P surfxml --sysid=surfxml.dtd -H $@ -L $^
+
+xbt/graphxml.l: $(srcdir)/xbt/graphxml.dtd
+ set -e; flexml -b 1000000 -P graphxml --sysid=graphxml.dtd -S $@ -L $^
+$(top_srcdir)/include/xbt/graphxml.h: $(srcdir)/xbt/graphxml.dtd
+ set -e; flexml -P graphxml --sysid=graphxml.dtd -H $@ -L $^