After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 510351 - gnome-build does not handle += correctly
gnome-build does not handle += correctly
Status: RESOLVED FIXED
Product: gnome-build
Classification: Deprecated
Component: libgbf_am
SVN HEAD
Other Linux
: Normal normal
: ---
Assigned To: gnome-build Maintainers List
gnome-build Maintainers List
Depends on:
Blocks:
 
 
Reported: 2008-01-18 10:08 UTC by Johannes Schmid
Modified: 2008-01-25 09:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix gnome-build += behaviour (1.18 KB, patch)
2008-01-24 16:23 UTC, 28872d13
committed Details | Review

Description Johannes Schmid 2008-01-18 10:08:24 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.
Comment 1 28872d13 2008-01-21 18:51:23 UTC
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?
Comment 2 Johannes Schmid 2008-01-22 12:34:58 UTC
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.
Comment 3 28872d13 2008-01-24 16:18:35 UTC
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.
Comment 4 28872d13 2008-01-24 16:23:09 UTC
Created attachment 103643 [details] [review]
Fix gnome-build += behaviour
Comment 5 Johannes Schmid 2008-01-25 09:45:56 UTC
Thanks for the patch!