Commit 8e83a52e authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Premier Makefile (dev only)

parent fcd63197
Loading
Loading
Loading
Loading

Makefile

0 → 100644
+44 −0
Original line number Diff line number Diff line
install-basex:
	@if [ -d 'basex' ]; then\
		echo 'BaseX install OK.';\
	else\
		curl https://files.basex.org/releases/10.7/BaseX107.zip --output BaseX107.zip;\
		unzip BaseX107.zip;\
		curl https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/10.8/Saxon-HE-10.8.jar --output Saxon-HE-10.8.jar ;\
		curl https://files.basex.org/modules/org/basex/modules/fop/FOP.jar --output FOP.jar ;\
		mv Saxon-HE-10.8.jar basex/lib/custom/;\
		mv FOP.jar basex/lib/custom/;\
		rm BaseX107.zip;\
		echo "======== Saisissez un mot de passe d'administration pour BaseX ========";\
		./basex/bin/basex -c PASSWORD;\
    fi

install: install-basex ##  installation de MaX
	./tools/max-dev.sh
	mkdir basex/webapp/MaX
	ln -s ../../../configuration basex/webapp/MaX/
	ln -s ../../../editions basex/webapp/MaX/
	ln -s ../../../ui basex/webapp/MaX/
	ln -s ../../../plugins basex/webapp/MaX/
	ln -s ../../../max.xq basex/webapp/MaX/
	ln -s ../../../rxq basex/webapp/MaX/
	ln -s ../../../package.json basex/webapp/MaX/

stop:  ## arrêt basex de dev
	./basex/bin/basexhttpstop || true

run:  stop ## lancement du serveur basex de dev
	./basex/bin/basexhttp -h1234 &

install-tei-demo: run ##  installation de l'édition de démo TEI
	sleep 2
	./tools/max.sh --d-tei
	@echo "done"

package:  ## packaging de la version à distribuer
	cd tools && ./build.sh

help: ## afficher l'aide
	@echo "\nChoisissez une commande. Les choix sont:\n"
	@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[0;36m%-12s\033[m %s\n", $$1, $$2}'
	@echo ""