GNOME Bugzilla – Bug 669930
makefile overwrites itself during build
Last modified: 2012-02-13 00:09:59 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.
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.
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