On Mon, 2015-12-14 at 09:34 +0300, Igor Sobinov wrote: > So, If I write in makefile > > > build_release: $(RELEASE_DIR) > @cd $(RELEASE_DIR); $(MAKE) release > > I got an error > > Also if I write > build_release: $(RELEASE_DIR) > $(MAKE) release -C $(RELEASE_DIR) > > I got an error too > > But this is successfull command: > # cd $RELEASE_DIR; make release -j10 > > Why make doesn't support jobs for subdirs?
All three of these work for me, so it must be something else in your makefile that you haven't shown us that's causing the problem. Can you provide a SSCCE (http://sscce.org/)? As Bill points out this is a make issue, NOT a cmake issue. I recommend you re-start this thread with all details (operating system, version of make, SSCCE, etc.) on the help-m...@gnu.org mailing list rather than here. I'll offer one possible suggestion, first: you haven't by any chance changed the SHELL variable in your external makefile to use csh, have you? SHELL = /bin/csh (or tcsh either). Because if you have, that's the problem. Csh is a terrible shell for many reasons but in particular it cannot be used as the shell for makefiles, if you want the jobserver feature to work. > core:: > +(cd core; make) > > With this, GNU Make is able to distribute the jobs between the > subdirectories. (I have a number of such targets in my main Makefile.) Bill's comment, that you should use $(MAKE) and never plain "make", is correct. It's better to use $(MAKE) for many reasons, only some of which are handled by prefixing the recipe with "+". -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake