GNOME Bugzilla – Bug 510351
gnome-build does not handle += correctly
Last modified: 2008-01-25 09:45:56 UTC
When the Makefile.am contains something like this (taken from glom sources): noinst_LIBRARIES = libutility_widgets.a libutility_widgets_a_SOURCES = alignment_justified.cc alignment_justified.h \ dialog_properties.cc dialog_properties.h \ if !GLOM_ENABLE_CLIENT_ONLY libutility_widgets_a_SOURCES += filechooserdialog_saveextras.cc endif gnome-build overwrites the first _SOURCES definition with the second. Instead, it should simply add the second to the first. Note that the if is not supported but we just ignore to show all possible source files in the GUI.
I just copied this into some Makefile.am, and gbf-am-parse --get gives me this: <target name='libutility_widgets.a' type='static_lib' id='libutility_widgets.a:static_lib'> <config> <param name="installdir" value="noinst"/> </config> <source uri='/alignment_justified.cc'/> <source uri='/alignment_justified.h'/> <source uri='/dialog_properties.cc'/> <source uri='/dialog_properties.h'/> <source uri='/filechooserdialog_saveextras.cc'/> </target> So... seems like it already works?
Could you try with the full glom sources? Maybe I missed the point when copying the part of the Makefile.am. The directory where the problem occurs is glom/utility_widgets.
You're right, alignment_justified.cc doesn't show up with the full glom sources. The reason why it worked with my testcase is simply that it only fails if the second assignment is broken into several lines. Then the original variable gets overwritten with only the new value.
Created attachment 103643 [details] [review] Fix gnome-build += behaviour
Thanks for the patch!