patrickfrey / strusBase

Implements some libraries with common functions and interfaces of the strus projects
Mozilla Public License 2.0
4 stars 1 forks source link

distclean doesn't clean up properly #11

Closed andreasbaumann closed 8 years ago

andreasbaumann commented 8 years ago

As many files created by cmake are ignored in .gitignore, make distclean doesn't delete them. (examples CMakeFiles directory, Makefile, cmake_install.cmake, etc.)

Applies to all strus projects.

andreasbaumann commented 8 years ago

distclean is expected to call clean.

andreasbaumann commented 8 years ago

Though the custom command distclean depends on clean it doesn't clean the directory of artifacts which would be cleaned by make clean:

install_manifest.txt
        libs/lib1/liblib1.so
        libs/lib1/liblib1.so.1.0
        libs/lib2/liblib2.so
        src/prog1/prog1

excuting a verbose distclean shows:

gmake VERBOSE=1 distclean
/usr/local/bin/cmake -H/home/abaumann/projects/cmake/cmaketest -B/home/abaumann/projects/cmake/cmaketest --check-build-system CMakeFiles/Makefile.cmake 0
gmake -f CMakeFiles/Makefile2 distclean
gmake[1]: Entering directory '/home/abaumann/projects/cmake/cmaketest'
/usr/local/bin/cmake -H/home/abaumann/projects/cmake/cmaketest -B/home/abaumann/projects/cmake/cmaketest --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/abaumann/projects/cmake/cmaketest/CMakeFiles 0
gmake -f CMakeFiles/Makefile2 CMakeFiles/distclean.dir/all
gmake[2]: Entering directory '/home/abaumann/projects/cmake/cmaketest'
gmake -f CMakeFiles/distclean.dir/build.make CMakeFiles/distclean.dir/depend
gmake[3]: Entering directory '/home/abaumann/projects/cmake/cmaketest'
cd /home/abaumann/projects/cmake/cmaketest && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/abaumann/projects/cmake/cmaketest /home/abaumann/projects/cmake/cmaketest /home/abaumann/projects/cmake/cmaketest /home/abaumann/projects/cmake/cmaketest /home/abaumann/projects/cmake/cmaketest/CMakeFiles/distclean.dir/DependInfo.cmake --color=
Dependee "/home/abaumann/projects/cmake/cmaketest/CMakeFiles/distclean.dir/DependInfo.cmake" is newer than depender "/home/abaumann/projects/cmake/cmaketest/CMakeFiles/distclean.dir/depend.internal".
Dependee "/home/abaumann/projects/cmake/cmaketest/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/abaumann/projects/cmake/cmaketest/CMakeFiles/distclean.dir/depend.internal".
Scanning dependencies of target distclean
gmake[3]: Leaving directory '/home/abaumann/projects/cmake/cmaketest'
gmake -f CMakeFiles/distclean.dir/build.make CMakeFiles/distclean.dir/build
gmake[3]: Entering directory '/home/abaumann/projects/cmake/cmaketest'
cleaning for source distribution
distribution clean
rm -Rf cmake.depends cmake.check_depends CMakeCache.txt cmake.check_cache *.cmake Makefile core core.* *~ */*~ */*/*~ CMakeFiles */CMakeFiles */*/CMakeFiles cmake_install.cmake */cmake_install.cmake */*/cmake_install.cmake Makefile */Makefile */*/Makefile cmake/uninstall.cmake Testing
gmake[3]: Leaving directory '/home/abaumann/projects/cmake/cmaketest'
Built target distclean
gmake[2]: Leaving directory '/home/abaumann/projects/cmake/cmaketest'
/usr/local/bin/cmake -E cmake_progress_start /home/abaumann/projects/cmake/cmaketest/CMakeFiles 0
gmake[1]: Leaving directory '/home/abaumann/projects/cmake/cmaketest'
andreasbaumann commented 8 years ago

The generated Makefile contains depends on a clean file. It doesn't call make with clean..

andreasbaumann commented 8 years ago

CMAKE_BUILD_TOOL is stubornly set to BSD make. We need GNU make...

The error message when calling make distclean is not really helpful:

/usr/bin/make clean
make: don't know how to make w
andreasbaumann commented 8 years ago

cmake -DCMAKE_MAKE_PROGRAM=/usr/local/bin/gmake does the trick.