On Thu, Jul 21, 2011 at 8:35 AM, Modestas Vainius <mo...@debian.org> wrote:
> Hello, > > On ketvirtadienis 21 Liepa 2011 00:22:20 gregory hainaut wrote: > > Package: debhelper > > Version: 8.9.1 > > Tags: patch > > > > Hello all, > > > > I'm facing the same issue for a personal project. > > In the correct run, debhelper detect the clean phase as a makefile > > build. However in our case the Makefile did not exist. The logic to > > detect the cmake build is only enabled during the configure phase. So > > debhelper fails to detect the build system. > > > > I attach a small patch to change the behavior. I do a quick test and > > seem to be fine. > > 1/ It enable the detection of the cmake build system during the clean > > phase. > > 2/ I copy past the clean function from makefile.pm to cmake.pm. > > It makes no sense to call `make clean` if Makefile does not exist. Probably > you didn't pass source or build directory properly. > > -- > Modestas Vainius <mo...@debian.org> > Hello, Well in this corner-case situation the idea was to remove the buildir, not to call `make clean`. Actually the current code never call `make clean` because rmdir_builddir nukes the builddir that contains the makefile. Previous patch will not change this behavior. In my opinion for cmake rmdir_builddir is enough but I wanted to keep change as small as possible. The current use case: 1/ run dh_auto_configure but interrupt before the end (error or manually interrupt). It will create a builddir but without makefile. The builddir will contains various files (binary and text). ... 2/ then do dh_auto_clean (rebuild of package for example). For the moment the builddir is left untouched actually dh_auto_build will do nothing because it call the default clean function (from memory, inside BuildSystem.pm). Note, if dh_auto_configure finished sucessfully, the buildir is properly remove during dh_auto_clean (this time clean comes from makefile.pm). Best regards, Gregory