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 687403 - autotools: run "make distclean" only if there is a Makefile
autotools: run "make distclean" only if there is a Makefile
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2012-11-02 04:37 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2012-11-05 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
autotools: run "make distclean" only if there is a Makefile (1.56 KB, patch)
2012-11-02 04:37 UTC, Diego Escalante Urrelo (not reading bugmail)
needs-work Details | Review
This should be more like it. (1.02 KB, patch)
2012-11-02 14:51 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2012-11-02 04:37:30 UTC
Proposing this patch to avoid running "make distclean" on directories
without a Makefile. For example, pristine tarballs when
makedistclean=True in jhbuildrc.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2012-11-02 04:37:32 UTC
Created attachment 227866 [details] [review]
autotools: run "make distclean" only if there is a Makefile

When building a completely new jhbuild root, I hit a lot of "no
distclean target" errors when building modules from tarballs.

I have makedistclean=True in my jhbuilrc.

I added a check in do_distclean so that "make distclean" is run:
 * ONLY if there is a usable Makefile in the directory.
 * AFTER giving self.branch.delete_unknown_files a chance to act.
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2012-11-02 04:38:23 UTC
Mmm. Commit message might a bit too anecdotic. I will fix it before pushing if the patch is OK :-)
Comment 3 Craig Keogh 2012-11-02 10:53:47 UTC
Review of attachment 227866 [details] [review]:

Thank you for the patch. Normally this check for a makefile is done in the skip_blah methods. See skip_clean for an example.
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2012-11-02 14:51:14 UTC
Created attachment 227896 [details] [review]
This should be more like it.

autotools: run "make distclean" only if there is a Makefile

Make sure "make distclean" is run only if there is a Makefile.
Comment 5 Craig Keogh 2012-11-05 10:40:15 UTC
Comment on attachment 227896 [details] [review]
This should be more like it.

Thank you for the patch. Committed.
http://git.gnome.org/browse/jhbuild/commit/?id=f3a97b4262affdd6f54a8df8f09e3e54247e897a