GNOME Bugzilla – Bug 759380
Fail to build Android NDK projects with multiple Java files
Last modified: 2015-12-14 09:13:38 UTC
Created attachment 317244 [details] [review] Fix gstreamer-1.0.mk build bug I have found that, when building Android NDK projects with multiple files getting installed in org/freedesktop/gstreamer, gstreamer-1.0.mk fails with errors like this: cp: target ‘X’ is not a directory I traced the error down to a missing ";" character in the following lines: gstreamer-1.0.mk:247 @$(foreach file,$(GSTREAMER_PLUGINS_CLASSES), \ $(call host-cp, \ $(GSTREAMER_NDK_BUILD_PATH)$(file), \ $(GSTREAMER_JAVA_SRC_DIR)/org/freedesktop/gstreamer/$(file))) The problem is that make joins multiple calls inside foreach with " ", unless you add a ";" character, in which case it joins them with "\n". Thus when the ";" character is missing, cp gets confused. By adding it, the issue goes away and the correct copy occurs. More information below: http://stackoverflow.com/questions/30220311/what-does-semicolon-termination-inside-a-makefiles-define-directive-do The attached patch fixes this issue and a few others, caused by the same issue.
Comment on attachment 317244 [details] [review] Fix gstreamer-1.0.mk build bug Thanks, makes sense. I'll merge this later
commit 43c7159d2e2e704b8acd6b002661abc0fcecc380 Author: Martin Kelly <martin@surround.io> Date: Thu Dec 10 16:55:43 2015 -0800 gstreamer-1.0.mk: fix missing ";" bug Several command invocations wrapped in for-each are missing ";" characters, which meant they get expanded on one line instead of separate lines. For some for-each invocations, you can get away with this and it will be OK, but for something like host-cp, it changes the meaning. As a result, some host-cp invocations will fail with errors like: cp: target ‘X’ is not a directory Fix this by adding the necessary semicolons. https://bugzilla.gnome.org/show_bug.cgi?id=759380