Makefile-fu
This commit is contained in:
parent
b8913618f4
commit
e7596e41f7
1 changed files with 9 additions and 3 deletions
12
Makefile
12
Makefile
|
@ -8,8 +8,13 @@ REX_VERSION := $(shell cat $(VERSION_FILE))
|
||||||
RELEASE_NAME := rexforge_$(REX_VERSION)
|
RELEASE_NAME := rexforge_$(REX_VERSION)
|
||||||
export REX_VERSION
|
export REX_VERSION
|
||||||
|
|
||||||
version:
|
help:
|
||||||
@echo $(RELEASE_NAME)
|
@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)
|
release: $(RELEASE_NAME)
|
||||||
make -C ./rex_client
|
make -C ./rex_client
|
||||||
|
@ -20,6 +25,7 @@ release: $(RELEASE_NAME)
|
||||||
cp ./VERSION.txt $(RELEASE_NAME)
|
cp ./VERSION.txt $(RELEASE_NAME)
|
||||||
cp ./README.md $(RELEASE_NAME)
|
cp ./README.md $(RELEASE_NAME)
|
||||||
mkdir -p $(RELEASE_NAME)/source
|
mkdir -p $(RELEASE_NAME)/source
|
||||||
|
cp ./VERSION.txt $(RELEASE_NAME)/source
|
||||||
git ls-files | xargs -I{} cp --parents {} $(RELEASE_NAME)/source
|
git ls-files | xargs -I{} cp --parents {} $(RELEASE_NAME)/source
|
||||||
date -I > $(RELEASE_NAME)/VERSION.txt
|
date -I > $(RELEASE_NAME)/VERSION.txt
|
||||||
echo $(rev) >> $(RELEASE_NAME)/VERSION.txt
|
echo $(rev) >> $(RELEASE_NAME)/VERSION.txt
|
||||||
|
@ -38,4 +44,4 @@ clean:
|
||||||
rm -rf *.tar.gz
|
rm -rf *.tar.gz
|
||||||
rm -rf rexforge_*
|
rm -rf rexforge_*
|
||||||
|
|
||||||
.PHONY: release clean container
|
.PHONY: release clean container help
|
||||||
|
|
Loading…
Add table
Reference in a new issue