mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
Fix wrapper Makefile dependency on CMake outcome (#1905)
If `cmake ..` in the build dir failed (e.g. because Lua could not be found), a subsequent `make` will cause a strange error (this is in non-quiet mode): ``` /src/awesome # make echo "Running make Makefile…" Running make Makefile… make -C build Makefile make[1]: Entering directory '/src/awesome/build' make[1]: *** No rule to make target 'Makefile'. Stop. make[1]: Leaving directory '/src/awesome/build' make: *** [Makefile:44: Makefile] Error 2 ``` With `s` in `MAKEFLAGS` (at the top of our Makefile): ``` Running make check-unit… make[1]: *** No rule to make target 'check-unit'. Stop. make: *** [Makefile:44: check-unit] Error 2 ``` Therefore this patch looks for build/Makefile to be generated really.
This commit is contained in:
parent
9938fc8a05
commit
30cbb0efe2
1 changed files with 4 additions and 4 deletions
8
Makefile
8
Makefile
|
@ -13,14 +13,14 @@ all: check-unit $(TARGETS) ;
|
|||
$(TARGETS): cmake-build
|
||||
ln -s -f $(BUILDDIR)/$@ $@
|
||||
|
||||
$(BUILDDIR)/CMakeCache.txt:
|
||||
$(BUILDDIR)/Makefile:
|
||||
$(ECHO) "Creating build directory and running cmake in it. You can also run CMake directly, if you want."
|
||||
$(ECHO)
|
||||
mkdir -p $(BUILDDIR)
|
||||
$(ECHO) "Running cmake…"
|
||||
cd $(BUILDDIR) && cmake $(CMAKE_ARGS) "$(@D)" ..
|
||||
|
||||
cmake-build: $(BUILDDIR)/CMakeCache.txt
|
||||
cmake-build: $(BUILDDIR)/Makefile
|
||||
$(ECHO) "Building…"
|
||||
$(MAKE) -C $(BUILDDIR)
|
||||
|
||||
|
@ -36,8 +36,8 @@ distclean:
|
|||
$(RM) -r $(BUILDDIR) $(TARGETS)
|
||||
$(ECHO) " done"
|
||||
|
||||
%: $(BUILDDIR)/CMakeCache.txt
|
||||
$(ECHO) "Running make $@…"
|
||||
%: $(BUILDDIR)/Makefile
|
||||
$(ECHO) "Running make $@ in $(BUILDDIR)…"
|
||||
$(MAKE) -C $(BUILDDIR) $@
|
||||
|
||||
.PHONY: cmake-build install distclean tags
|
||||
|
|
Loading…
Reference in a new issue