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 669930 - makefile overwrites itself during build
makefile overwrites itself during build
Status: RESOLVED FIXED
Product: libpeas
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libpeas-maint
libpeas-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-12 16:04 UTC by Allison Karlitskaya (desrt)
Modified: 2012-02-13 00:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
extension-js test: clean up Makefile (1.45 KB, patch)
2012-02-12 16:13 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2012-02-12 16:04:07 UTC
extension-js/Makefile.am is pretty heavily broken.  Taking just a few lines as an example:



%.plugin: extension-js.plugin
        $(AM_V_GEN) cp $< $@ && \
        $(SED) -i -e 's/JS_LOADER/$(@:extension-%.plugin=%)/g' $@


This rule is broken in two ways.  First, you cannot use "/" as a separator for sed expressions with pathnames because the pathnames will have "/" in them, causing the expression to be mis-parsed.

Second is that implicit rule is quite dangerous.  It will produce any *.plugin file.

The trouble is that at the start of the file there is:

include $(top_srcdir)/tests/Makefile.plugin

And this dangerous rule gets matched and regenerates that Makefile.plugin as a keyfile.

The result of these two problems is that the first time you run the build, you get a sed error (from using '/' as a separator).  The second time you run the build, the Makefile has been replaced with a keyfile so you get an error for that.
Comment 1 Allison Karlitskaya (desrt) 2012-02-12 16:13:11 UTC
Created attachment 207395 [details] [review]
extension-js test: clean up Makefile

There were a couple of unsafe things going on in this Makefile.  Fix
them up so that the build isn't broken.
Comment 2 Allison Karlitskaya (desrt) 2012-02-13 00:09:54 UTC
Attachment 207395 [details] pushed as d20a8db - extension-js test: clean up Makefile

16:23 < nud> desrt: the patch looks fine, imho you can just commit