Skip to content

Commit

Permalink
Improving build/ Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Nov 5, 2023
1 parent 1933519 commit d107c29
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ help:
@echo "git-subs-update update git submodules"
@echo "gen-lib-class generate lib C++ class skeleton: CLASS_NAME=My_Class"
@echo "gen-ui-class generate UI C++ class skeleton: CLASS_NAME=My_Class"
@echo "devenv-debian install development environment on Debian"
@echo "clean clean build artifacts"
@echo "build build MindForger binary"
@echo "l10n update and release localization strings: MF_LANG=en"
Expand All @@ -50,24 +51,31 @@ help:
@echo "api-reference generate Doxygen documentation"
@echo "dev-install-local compile and install binary to ~/bin as MIND"

.PHONY: clean
clean:
rm -vf ../app/mindforger
rm -vf ../lib/libmindforger.a
rm -vf ../lib/test/src/mindforger-lib-unit-tests
cd .. && make clean
cd ../lib/test && make clean

.PHONY: git-subs-update
git-subs-update:
cd .. && git submodule update --init --recursive

.PHONY: gen-lib-class
gen-lib-class:
@echo "Generating lib C++ class for name: $(CLASS_NAME)"
./make/gen-cpp-class.py $(CLASS_NAME)

.PHONY: gen-ui-class
gen-ui-class:
@echo "Generating UI C++ class for name: $(CLASS_NAME)"
./make/gen-cpp-ui-class.py $(CLASS_NAME)

.PHONY: devenv-debian
devenv-debian:
sudo apt-get install build-essential zlib1g-dev libhunspell-dev libqt5webkit5-dev qttools5-dev-tools ccache cmake

build: clean
cd .. && qmake -r mindforger.pro && make -j 7
Expand All @@ -80,12 +88,14 @@ build-ci: clean
@echo "If CI build succeeded, then MindForger executable can be found in:\n app/mindforger"
ls -al ../app/mindforger

.PHONY: l10n
l10n:
cd make && ./l10n-update-strings.sh && ./l10n-edit-and-release.sh $(MF_LANG)

test-lib: clean
cd make && ./test-lib-units.sh

.PHONY: dist-work-clean
dist-work-clean:
rm -rvf $(MF_MAKER_WORKING_DIR)

Expand All @@ -107,32 +117,40 @@ dist-deb: dist-work-clean $(MF_MAKER_WORKING_DIR) $(MINDFORGER_RELEASE_DIR)
cp -vf ./debian/debian-make-deb.sh $(MF_MAKER_WORKING_DIR) && cd $(MF_MAKER_WORKING_DIR) && ./debian-make-deb.sh
cp -vf $(MF_MAKER_WORKING_DIR)/`cd $(MF_MAKER_WORKING_DIR) && ls -d mindforger*`/mindforger_$(MINDFORGER_VERSION)-1_amd64.deb $(MINDFORGER_RELEASE_DIR)

.PHONY: dist-rpm
dist-rpm:
@echo "IMPORTANT: this target MUST be run on Fedora!"
cd fedora && ./fedora-distro-setup.sh
@echo "Building .rpm package..."
cp -vf ./fedora-rpm-from-deb.sh ~/alien && cd ~/alien && sudo ./fedora-rpm-from-deb.sh $(MINDFORGER_VERSION)
@echo "Find .rpm in ~/alien directory"

.PHONY: dist-dmg
dist-dmg:
@echo "Building .dmg package..."
cd macos && ./mindforger-build.sh && ./dmg-package-build.sh

.PHONY: dist-debian-ppa
dist-debian-ppa:
cd debian && ./debian-aptly-add-deb.sh

.PHONY: dist-all-clean
dist-all-clean:
rm -rvf $(MINDFORGER_RELEASE_DIR)

.PHONY: dist-all
dist-all: dist-all-clean $(MINDFORGER_RELEASE_DIR) dist-tarball dist-deb
@echo "Building all $(MINDFORGER_VERSION) distributions"

.PHONY: statistic
statistic:
cd make && ./statistic.sh

.PHONY: doc-to-wiki
doc-to-wiki:
cd doc && ./mf-doc-to-wiki.py

.PHONY: api-reference
api-reference:
cd doxygen && doxygen ./mindforger.cfg

Expand Down

0 comments on commit d107c29

Please sign in to comment.