msspec_python3/Makefile

50 lines
1.8 KiB
Makefile

MAKESELF:=makeself
#LICENSE:=$(cat ./license.txt)
#VERSION:=$(shell cd src && python -c "import msspec; print(msspec.__version__)")
VERSION:=$(shell git describe|sed 's/-\([[:digit:]]\+\)-.*/\.post\1/')
SETUPFILE:=MsSpec-$(VERSION).setup
.PHONY: clean purge version selfex
clean:
@echo "Cleaning all..."
@find ./src -type f -name '*.pyc' -exec rm -f {} +
@find ./src -type d -name '__pycache__' -exec rm -rf {} +
+$(MAKE) -C src/ clean
+$(MAKE) -C doc/ clean
version:
@python ./CI/update_version.py
purge: clean
@echo "Purging all..."
@rm -rf *.setup
+$(MAKE) -C src/ purge
selfex:
@echo "Creating the self-extractible setup program... "
# update the version
@cp ./src/msspec/version.py ./src/msspec/version.py.bak
@echo "__version__ = \"$(VERSION)\"" > ./src/msspec/version.py
# create the *.lsm file
@echo "Begin4" > msspec.lsm
@echo "Title: Python MsSpec" >> msspec.lsm
@echo "Version: $(VERSION)" >> msspec.lsm
@echo "Entered-date: `date +%Y-%m-%d`" >> msspec.lsm
@echo "Description: A multiple scattering package for spectroscopies using electrons to probe materials" >> msspec.lsm
@echo "Keywords: " >> msspec.lsm
@echo "Author: sylvain.tricot@univ-rennes1.fr (Sylvain Tricot), didier.sebilleau@univ-rennes1.fr (Didier Sébilleau)" >> msspec.lsm
@echo "Maintained-by: sylvain.tricot@univ-rennes1.fr (Sylvain Tricot)" >> msspec.lsm
@echo "Primary-site: https://msspec.cnrs.fr" >> msspec.lsm
@echo "Alternate-site:" >> msspec.lsm
@echo "Original-site:" >> msspec.lsm
@echo "Platforms:" >> msspec.lsm
@echo "Copying-policy: Gnu Library General Public License (GLPL) 2.0" >> msspec.lsm
@echo "End" >> msspec.lsm
$(MAKESELF) --license "./license.txt" --lsm ./msspec.lsm ./src $(SETUPFILE) "Python MsSpec" ./install.sh
@mv ./src/msspec/version.py.bak ./src/msspec/version.py
@rm ./msspec.lsm