Updated Makefile
Added a clean recipe to remove all built components.
This commit is contained in:
parent
3f0a9b8514
commit
b8f1af3173
14
Makefile
14
Makefile
|
|
@ -3,6 +3,9 @@ CMAKE=/usr/bin/cmake
|
|||
MESON=/usr/bin/meson
|
||||
# Paths for installed apps
|
||||
INCLUDE_SYS_PATH=/usr/include
|
||||
# Components and libraries
|
||||
COMPONENTS=hyprcursor Hyprland hyprlang hyprlock hyprpaper hyprutils \
|
||||
hyprwayland-scanner wl-clipboard tomlplusplus libxcb-errors
|
||||
|
||||
# Set the default target to build
|
||||
.DEFAULT_GOAL := all
|
||||
|
|
@ -106,7 +109,6 @@ $(__Wl_clipboard)/wl-copy $(__Wl_clipboard)/wl-paste &:
|
|||
ninja -C wl-clipboard/build
|
||||
|
||||
### PHONY targets that a user would run ###
|
||||
.PHONY : all
|
||||
all:
|
||||
@if git submodule status | grep --quiet '^-' ; then\
|
||||
echo "Git submodules have not been initialised. Please run: git \
|
||||
|
|
@ -115,10 +117,8 @@ submodule update --init --recursive" ; exit 1 ;\
|
|||
@cd Hyprland/subprojects && git submodule update --init
|
||||
$(MAKE) build
|
||||
|
||||
.PHONY : build
|
||||
build: $(__Hyprlock) $(__Hyprpaper) $(__Wl_clipboard)/wl-copy $(__Hyprland)
|
||||
|
||||
.PHONY : install
|
||||
install: build
|
||||
@echo "Installing hyprlock..."
|
||||
sudo $(CMAKE) --install hyprlock/build
|
||||
|
|
@ -129,8 +129,12 @@ install: build
|
|||
@echo "Installing Hyprland"
|
||||
sudo $(MAKE) -C Hyprland install
|
||||
|
||||
|
||||
.PHONY: test
|
||||
test: build
|
||||
@echo "Be real, you don't want to do this, so we'll abort."
|
||||
$(error No test-suite implemented)
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up from build process..."
|
||||
sudo rm -rf $(addsuffix /build, $(COMPONENTS)) >/dev/null 2>&1
|
||||
|
||||
.PHONY : all build install test
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user