Updated Makefile

Updated clean target to use Makefiles of other projects for cleaning.
The rm for build directories still remains for other projects.
This commit is contained in:
Ethan Smith-Coss 2024-07-01 22:55:23 +01:00
parent ab379ad0b5
commit 98fe643950
Signed by: TheOnePath
GPG Key ID: 1D351CCC6D01F32B

View File

@ -4,8 +4,8 @@ MESON=/usr/bin/meson
# Paths for installed apps # Paths for installed apps
INCLUDE_SYS_PATH=/usr/include INCLUDE_SYS_PATH=/usr/include
# Components and libraries # Components and libraries
COMPONENTS=hyprcursor Hyprland hyprlang hyprlock hyprpaper hyprutils \ COMPONENTS=hyprcursor hyprlang hyprlock hyprpaper hyprutils wl-clipboard \
hyprwayland-scanner wl-clipboard tomlplusplus libxcb-errors hyprwayland-scanner tomlplusplus libxcb-errors
# Set the default target to build # Set the default target to build
.DEFAULT_GOAL := all .DEFAULT_GOAL := all
@ -136,6 +136,9 @@ update:
# In case these libraries haven't been pulled yet, ignore the exit code # In case these libraries haven't been pulled yet, ignore the exit code
-cd tomlplusplus && git pull origin $$(git rev-parse --abbrev-ref HEAD) -cd tomlplusplus && git pull origin $$(git rev-parse --abbrev-ref HEAD)
-cd libxcb-error && git pull origin $$(git rev-parse --abbrev-ref HEAD) -cd libxcb-error && git pull origin $$(git rev-parse --abbrev-ref HEAD)
@echo "Please note that if tomlplusplus or libxcb-errors throw an error \
for not being found, this is defined behaviour since these libraries \
are cloned into the project later. You can safely ignore this."
test: build test: build
@echo "Be real, you don't want to do this, so we'll abort." @echo "Be real, you don't want to do this, so we'll abort."
@ -143,6 +146,8 @@ test: build
clean: clean:
@echo "Cleaning up from build process..." @echo "Cleaning up from build process..."
@echo "Cleaning Hyprland with Makefile."
$(MAKE) -C Hyprland clear
rm -rf $(addsuffix /build, $(COMPONENTS)) >/dev/null 2>&1 rm -rf $(addsuffix /build, $(COMPONENTS)) >/dev/null 2>&1
.PHONY : all build install test clean update .PHONY : all build install test clean update