Fixed builds from a directory outside of the sourcetree.
[captive.git] / src / libcaptive / ke / Makefile.am
index 07d110b..6ba224e 100644 (file)
@@ -35,7 +35,8 @@ libke_la_SOURCES= \
 
 EXTRA_DIST+= \
                $(noinst_SCRIPTS) \
-               exports.captivesym
+               exports.captivesym \
+               exports.def
 
 # Generate exports.c automatically from exports.captivesym by captivesym.pl
 noinst_SCRIPTS=captivesym.pl
@@ -44,6 +45,13 @@ BUILT_SOURCES+=exports.c
 CLEANFILES+=exports.c
 libke_la_SOURCES+=exports.c
 
+if HAVE_PERL
 # FIXME: a difference between "ntoskrnl/ntoskrnl.def" vs. "ntoskrnl/ntoskrnl.edf"?
 exports.c: exports.captivesym captivesym.pl exports.def $(top_srcdir)/reactos/ntoskrnl/ntoskrnl.def $(top_srcdir)/reactos/hal/hal/hal.def
-       perl captivesym.pl $(top_srcdir)/reactos/ntoskrnl/ntoskrnl.def $(top_srcdir)/reactos/hal/hal/hal.def exports.def $< >$@
+       $(PERL) $(srcdir)/captivesym.pl \
+                       $(top_srcdir)/reactos/ntoskrnl/ntoskrnl.def \
+                       $(top_srcdir)/reactos/hal/hal/hal.def \
+                       $(srcdir)/exports.def \
+                       $< >$@
+
+endif