Makefile-fu

This commit is contained in:
Imbus 2025-01-28 11:17:46 +01:00
parent b8913618f4
commit e7596e41f7

View file

@ -8,8 +8,13 @@ REX_VERSION := $(shell cat $(VERSION_FILE))
RELEASE_NAME := rexforge_$(REX_VERSION)
export REX_VERSION
version:
@echo $(RELEASE_NAME)
help:
@echo -e "Makefile for $(RELEASE_NAME)\n"
@echo "Available targets:"
@echo " release - Create a release version and package"
@echo " clean - Clean up build files"
@echo " container - Build an OCI container (requires podman)"
@echo " help - Show this help message"
release: $(RELEASE_NAME)
make -C ./rex_client
@ -20,6 +25,7 @@ release: $(RELEASE_NAME)
cp ./VERSION.txt $(RELEASE_NAME)
cp ./README.md $(RELEASE_NAME)
mkdir -p $(RELEASE_NAME)/source
cp ./VERSION.txt $(RELEASE_NAME)/source
git ls-files | xargs -I{} cp --parents {} $(RELEASE_NAME)/source
date -I > $(RELEASE_NAME)/VERSION.txt
echo $(rev) >> $(RELEASE_NAME)/VERSION.txt
@ -38,4 +44,4 @@ clean:
rm -rf *.tar.gz
rm -rf rexforge_*
.PHONY: release clean container
.PHONY: release clean container help