erplibre/Makefile
Mathieu Benoit 081fadcde6 [ADD] makefile addons installation
- support code_generator

Signed-off-by: Mathieu Benoit <mathben@technolibre.ca>
2021-01-18 05:17:59 -05:00

148 lines
3.6 KiB
Makefile

SHELL := /bin/bash
#############
# General #
#############
# ALL
.PHONY: all
all: doc
###############
# Detect OS #
###############
# https://stackoverflow.com/questions/714100/os-detecting-makefile
DETECTED_OS := $(shell uname -s)
############################
# Detect browser command #
############################
#BROWSER := ls
ifeq ($(DETECTED_OS),Darwin)
BROWSER := open
else
ifeq ($(DETECTED_OS),Linux)
BROWSER := xdg-open
else
ifeq ($(OS),Windows_NT)
BROWSER := start
else
BROWSER := ls
endif
endif
endif
#########################
# Addons installation #
#########################
.PHONY: addons_install_code_generator_demo
addons_install_code_generator_demo:
./run.sh --no-http --stop-after-init -d code_generator -i code_generator_demo -u code_generator_demo
.PHONY: addons_uninstall_code_generator_demo
addons_uninstall_code_generator_demo:
./run.sh --no-http --stop-after-init -d code_generator --uninstall code_generator_demo
############
# docker #
############
# build docker
.PHONY: docker_build
docker_build:
./script/docker_build.sh
# build docker release
.PHONY: docker_build_release
docker_build_release:
./script/docker_build.sh --release
# docker clean all
.PHONY: docker_clean_all
docker_clean_all:
docker system prune -a --volumes
##############
# Git repo #
##############
# clear all repo DANGER
.PHONY: repo_clear_all
repo_clear_all:
./script/clean_repo_manifest.sh
# change all repo to ssh on all remote
.PHONY: repo_use_all_ssh
repo_use_all_ssh:
./script/git_change_remote_https_to_git.py
# change all repo to https on all remote
.PHONY: repo_use_all_https
repo_use_all_https:
./script/git_change_remote_https_to_git.py --git_to_https
###################
# Configuration #
###################
# generate new config.conf
.PHONY: config_install
config_install:
./script/install_locally.sh
# generate config all repo
.PHONY: config_gen_all
config_gen_all:
./script/git_repo_update_group.py
./script/install_locally.sh
# generate config repo code_generator
.PHONY: config_gen_code_generator
config_gen_code_generator:
./script/git_repo_update_group.py --group base,code_generator
./script/install_locally.sh
###################
# Documentation #
###################
# documentation all
.PHONY: doc
doc: doc_dev doc_migration doc_test doc_user
# documentation clean all
.PHONY: doc_clean
doc_clean: doc_clean_dev doc_clean_migration doc_clean_test doc_clean_user
# documentation dev
.PHONY: doc_dev
doc_dev:
source ./.venv/bin/activate && make -C doc/itpp-labs_odoo-development/docs html || exit 1
-$(BROWSER) doc/itpp-labs_odoo-development/docs/_build/html/index.html
.PHONY: doc_clean_dev
doc_clean_dev:
make -C doc/itpp-labs_odoo-development/docs clean
# documentation migration
.PHONY: doc_migration
doc_migration:
source ./.venv/bin/activate && make -C doc/itpp-labs_odoo-port-docs/docs html || exit 1
-$(BROWSER) doc/itpp-labs_odoo-port-docs/docs/_build/html/index.html
.PHONY: doc_clean_migration
doc_clean_migration:
make -C doc/itpp-labs_odoo-port-docs/docs clean
# documentation test
.PHONY: doc_test
doc_test:
source ./.venv/bin/activate && make -C doc/itpp-labs_odoo-test-docs/doc-src html || exit 1
-$(BROWSER) doc/itpp-labs_odoo-test-docs/doc-src/_build/html/index.html
.PHONY: doc_clean_test
doc_clean_test:
make -C doc/itpp-labs_odoo-test-docs/doc-src clean
# documentation user
.PHONY: doc_user
doc_user:
source ./.venv/bin/activate && make -C doc/odoo_documentation-user html || exit 1
-$(BROWSER) doc/odoo_documentation-user/_build/html/index.html
.PHONY: doc_clean_user
doc_clean_user:
make -C doc/odoo_documentation-user clean