2022-10-05 08:35:08 +00:00
|
|
|
V:=$(shell cat VERSION)
|
|
|
|
TOP_DIR:=$(shell pwd)
|
|
|
|
BUILD_DIR:=$(TOP_DIR)/build
|
|
|
|
DEB_DIR:=$(BUILD_DIR)/deb/myx-cmake-$(V)
|
|
|
|
PACK_DIR:=$(BUILD_DIR)/pack/myx-cmake-$(V)
|
2023-09-14 11:17:16 +00:00
|
|
|
UNITY_DIR:=$(BUILD_DIR)/unity
|
|
|
|
UNITY_V_DIR:=$(BUILD_DIR)/myx-cmake-unity-$(V)
|
2022-10-05 08:35:08 +00:00
|
|
|
|
2023-09-14 11:17:16 +00:00
|
|
|
all: v deb pack unity
|
2022-10-05 08:35:08 +00:00
|
|
|
|
2022-10-06 18:09:59 +00:00
|
|
|
v:
|
2022-10-06 08:34:47 +00:00
|
|
|
sed -i "s/\/[0-9][0-9.]\+/\/$V/g" $(TOP_DIR)/README.md
|
|
|
|
sed -i "s/[0-9][0-9.]\+tar/$V.tar/g" $(TOP_DIR)/README.md
|
2022-10-05 08:35:08 +00:00
|
|
|
sed -i "s/CMake.*REQUIRED/CMake $V REQUIRED/" $(TOP_DIR)/README.md $(TOP_DIR)/myx_setup.cmake
|
|
|
|
sed -i "s/VERSION \".*\"/VERSION \"$V\"/" $(TOP_DIR)/MyxCMake/MyxCMakeConfigVersion.cmake
|
|
|
|
sed -i "s/VERSION .* LANG/VERSION $V LANG/" $(TOP_DIR)/debian/CMakeLists.txt
|
|
|
|
sed -i "s/(.*)/($(V))/" $(TOP_DIR)/debian/changelog
|
2024-03-12 13:30:05 +00:00
|
|
|
git commit -a -m "$(V)"
|
2022-10-05 08:35:08 +00:00
|
|
|
|
|
|
|
deb:
|
|
|
|
rm -rf $(DEB_DIR)
|
|
|
|
mkdir -p $(DEB_DIR)
|
|
|
|
cp -ap "$(TOP_DIR)/MyxCMake" "$(TOP_DIR)/debian" "$(DEB_DIR)"
|
|
|
|
cd $(DEB_DIR); debuild
|
|
|
|
mv $(BUILD_DIR)/deb/*deb $(BUILD_DIR)
|
|
|
|
mv $(BUILD_DIR)/deb/*dsc $(BUILD_DIR)
|
|
|
|
mv $(BUILD_DIR)/deb/*xz $(BUILD_DIR)
|
|
|
|
|
|
|
|
pack:
|
|
|
|
rm -rf $(PACK_DIR)
|
|
|
|
mkdir -p $(PACK_DIR)
|
|
|
|
cp -ap $(TOP_DIR)/MyxCMake $(PACK_DIR)/myx
|
|
|
|
cp -ap $(TOP_DIR)/myx_setup.cmake $(PACK_DIR)
|
|
|
|
cd $(PACK_DIR); tar acf $(BUILD_DIR)/myx-cmake-local-$(V).tar.xz *
|
|
|
|
|
2023-09-14 11:17:16 +00:00
|
|
|
unity:
|
|
|
|
rm -rf $(UNITY_DIR)
|
|
|
|
rm -rf $(UNITY_V_DIR)
|
|
|
|
mkdir -p $(UNITY_DIR)
|
|
|
|
python3 myx-unity.py > $(UNITY_DIR)/m.cmake
|
|
|
|
mv $(UNITY_DIR)/m.cmake $(UNITY_DIR)/myx/MyxCMakeConfig.cmake
|
|
|
|
mv $(UNITY_DIR) $(UNITY_V_DIR)
|
|
|
|
cd $(UNITY_V_DIR); tar acf $(BUILD_DIR)/myx-cmake-unity-$(V).tar.xz *
|
|
|
|
|
2022-10-05 12:04:56 +00:00
|
|
|
upload:
|
|
|
|
git tag $(V)
|
2023-07-30 08:27:10 +00:00
|
|
|
gitea-tea r c --repo cmake/myx -t $(V) --tag $(V) \
|
2022-10-05 12:04:56 +00:00
|
|
|
-a $(BUILD_DIR)/myx-cmake_$(V).dsc \
|
|
|
|
-a $(BUILD_DIR)/myx-cmake_$(V).tar.xz \
|
|
|
|
-a $(BUILD_DIR)/myx-cmake_$(V)_all.deb \
|
2023-09-14 11:20:00 +00:00
|
|
|
-a $(BUILD_DIR)/myx-cmake-local-$(V).tar.xz \
|
2023-09-14 11:17:16 +00:00
|
|
|
-a $(BUILD_DIR)/myx-cmake-unity-$(V).tar.xz
|
2022-10-05 12:04:56 +00:00
|
|
|
git tag -d $(V)
|
|
|
|
git push
|