awesome/Makefile
Daniel Hahler 36d7535cd5
Minor: typos, Makefile aesthetics (#2690)
* lib/awful/mouse/resize.lua: s/extendable/extensible

* Fix code comment typo: s/find/found

* Makefile: remove -n with echo

Missed in e9b5e28d1.
2019-02-22 08:42:43 +01:00

47 lines
1.1 KiB
Makefile

ifeq (,$(VERBOSE))
MAKEFLAGS:=$(MAKEFLAGS)s
ECHO=echo
else
ECHO=@:
endif
BUILDDIR=build
# Run "make" in $(BUILDDIR) by default.
# This is required to generate all files already, which should not be generated
# with "(sudo) make install" only later.
cmake-build: $(BUILDDIR)/Makefile
$(ECHO) "Building…"
$(MAKE) -C $(BUILDDIR)
# Run CMake with CMAKE_ARGS defined on command line ("make CMAKE_ARGS=…").
ifeq ($(origin CMAKE_ARGS),command line)
.PHONY: $(BUILDDIR)/Makefile
endif
$(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) "$(CURDIR)"
tags:
git ls-files | xargs ctags
install:
$(ECHO) "Installing…"
$(MAKE) -C $(BUILDDIR) install
distclean:
$(ECHO) "Cleaning up build directory…"
$(RM) -r $(BUILDDIR)
# Use an explicit rule to not "update" the Makefile via the implicit rule below.
Makefile: ;
%: $(BUILDDIR)/Makefile
$(ECHO) "Running make $@ in $(BUILDDIR)"
$(MAKE) -C $(BUILDDIR) $@
.PHONY: cmake-build install distclean tags