The Python interface was added to BUILT_SOURCES in
isl-0.26-9-g0ec55f352c
(always build Python interface if possible, Sat Mar 18 17:07:44 2023 +0100),
but the only purpose was to ensure that it gets built as part of "make all".
As reported by Sergei Trofimovich, adding interface/isl.py to BUILT_SOURCES
results in an interdependence between two entries: gitversion.h and
interface/isl.py.
In particular, there is a dependence of the form
interface/isl.py -> interface/isldlname.py -> libisl.la
-> isl_version.lo -> gitversion.h
The dependence isl_version.lo -> gitversion.h is not
explicitly specified, but is instead obtained as a side-effect
of compilation through automatic dependency tracking.
However, during the first build, this is not available yet.
Usually, gitversion.h ends up getting built first, but, strictly
speaking, this is not guaranteed, and "make --shuffle" can break
the build.
It would be possible to add an explicit dependence,
but it is simpler to just remove interface/isl.py from BUILT_SOURCES
since it does not belong there anyway.
Adding it to all-local is sufficient to ensure that it gets
built as part of "make all".
Reported-by: Sergei Trofimovich <slyich@gmail.com>
Tested-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
@@ -513,7 +513,7 @@ if HAVE_CXX11
BUILT_CPP_INTERFACES = $(CPP_INTERFACES)
endif
endif
-BUILT_SOURCES = gitversion.h $(BUILT_CPP_INTERFACES) interface/isl.py
+BUILT_SOURCES = gitversion.h $(BUILT_CPP_INTERFACES)
CLEANFILES = \
gitversion.h \
interface/isldlname.py \
@@ -726,6 +726,8 @@ pkgconfig_DATA = $(pkgconfig_libfile)
gitversion.h: @GIT_HEAD@
$(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
+all-local: interface/isl.py
+
install-data-local: $(srcdir)/libisl-gdb.py
@libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
$(builddir)/libisl.la`; \