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 780499 - make: use proper Makefile when project-file is not in root working directory
make: use proper Makefile when project-file is not in root working directory
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
Flatpak Nightly Channel
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-24 12:13 UTC by Brenton Horne
Modified: 2017-03-24 23:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make: Set directory of build launchers (3.08 KB, patch)
2017-03-24 18:08 UTC, Matthew Leeds
committed Details | Review

Description Brenton Horne 2017-03-24 12:13:57 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.
Comment 1 Matthew Leeds 2017-03-24 18:08:57 UTC
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/).
Comment 2 Christian Hergert 2017-03-24 22:48:15 UTC
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.
Comment 3 Christian Hergert 2017-03-24 23:04:32 UTC
Attachment 348664 [details] pushed as 100c5e6 - make: Set directory of build launchers