mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
140481a3e5
It should get run explicitly only. As for Travis: we run it there initially (when just using `make`, and later again - at least when using check-unit-coverage).
42 lines
832 B
Makefile
42 lines
832 B
Makefile
ifeq (,$(VERBOSE))
|
|
MAKEFLAGS:=$(MAKEFLAGS)s
|
|
ECHO=echo
|
|
else
|
|
ECHO=@:
|
|
endif
|
|
|
|
TARGETS=awesome
|
|
BUILDDIR=build
|
|
|
|
all: $(TARGETS) ;
|
|
|
|
$(TARGETS): cmake-build
|
|
|
|
$(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)/Makefile
|
|
$(ECHO) "Building…"
|
|
$(MAKE) -C $(BUILDDIR)
|
|
|
|
tags:
|
|
git ls-files | xargs ctags
|
|
|
|
install:
|
|
$(ECHO) "Installing…"
|
|
$(MAKE) -C $(BUILDDIR) install
|
|
|
|
distclean:
|
|
$(ECHO) -n "Cleaning up build directory…"
|
|
$(RM) -r $(BUILDDIR) $(TARGETS)
|
|
$(ECHO) " done"
|
|
|
|
%: $(BUILDDIR)/Makefile
|
|
$(ECHO) "Running make $@ in $(BUILDDIR)…"
|
|
$(MAKE) -C $(BUILDDIR) $@
|
|
|
|
.PHONY: cmake-build install distclean tags
|