If lib*_la_SOURCES are defined in a if/endif alternative, it works for
compilation, but the dist target uses the first variante of the
variable, regardless of whether this is the used variante or not.
So, use yet another name in the alternative and define lib*_la_SOURCES
only once, out of the alternatives
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6861
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
##
## Compile the libs
CLEANFILES=
##
## Compile the libs
CLEANFILES=
simgrid_fragile_sources=gras/DataDesc/ddt_parse.yy.c surf/surfxml_parse.c xbt/graphxml_parse.c simdag/sd_daxloader.c
gras_fragile_sources=gras/DataDesc/ddt_parse.yy.c xbt/graphxml_parse.c
simgrid_fragile_sources=gras/DataDesc/ddt_parse.yy.c surf/surfxml_parse.c xbt/graphxml_parse.c simdag/sd_daxloader.c
gras_fragile_sources=gras/DataDesc/ddt_parse.yy.c xbt/graphxml_parse.c
./mk_supernovae.sh supernovae_smpi.c $(filter-out $(smpi_fragile_sources),$(smpi_sources))
CLEANFILES+=supernovae_sg.c supernovae_gras.c supernovae_smpi.c
./mk_supernovae.sh supernovae_smpi.c $(filter-out $(smpi_fragile_sources),$(smpi_sources))
CLEANFILES+=supernovae_sg.c supernovae_gras.c supernovae_smpi.c
-libsimgrid_la_SOURCES = supernovae_sg.c $(simgrid_fragile_sources)
-libgras_la_SOURCES = supernovae_gras.c $(gras_fragile_sources)
+simgrid_sources_to_use = supernovae_sg.c $(simgrid_fragile_sources)
+gras_sources_to_use = supernovae_gras.c $(gras_fragile_sources)
-libsimgrid_la_SOURCES = $(simgrid_sources)
-libgras_la_SOURCES=$(gras_sources)
+simgrid_sources_to_use = $(simgrid_sources)
+gras_sources_to_use = $(gras_sources)
+# Automake 11 has a bug if the 2 next variables are defined twice in #if branches.
+# The dist target uses the first definition, regardless of whether it is the used branch or not
+libsimgrid_la_SOURCES = $(simgrid_sources_to_use)
+libgras_la_SOURCES = $(gras_sources_to_use)
+