GNOME Bugzilla – Bug 780499
make: use proper Makefile when project-file is not in root working directory
Last modified: 2017-03-24 23:04:35 UTC
From the GNOME nightly Flatpak for GNOME Builder I opened a Makefile in a subdirectory of a git root folder and running build fails as it cannot find the Makefile I opened GNOME Builder to. It seems like GNOME Builder is looking for a Makefile ONLY in the git root directory and NOT using the Makefile I opened Builder to. According to hergertme (if I understand him right) in the #gnome-builder IRC channel, it is likely due to this Python script being insufficient https://git.gnome.org/browse/gnome-builder/tree/plugins/make/make_plugin/__init__.py#n104.
Created attachment 348664 [details] [review] make: Set directory of build launchers This sets the working directory of the launchers (for make, make clean, etc.) to the directory containing the Makefile, which is important in case it's a subdirectory of the root project directory (the one with .git/).
Review of attachment 348664 [details] [review]: LGTM. Some things it might be a good idea to add after this come from https://people.gnome.org/~walters/docs/build-api.txt - Check for .NOTPARALLEL in the Makefile, and remove -j{} option Harder stuff because Build API says these should be in "configure". - buildapi-variable-no-builddir - buildapi-variable-require-builddir - buildapi-variable-supports-runtime-devel Although, perhaps we should check for configure (but make it optional). Plenty of BSD projects even use autoconf, but not automake.
Attachment 348664 [details] pushed as 100c5e6 - make: Set directory of build launchers