From 7abece217ec4d6657d59e22d76ff5e90b9f41819 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 1 Feb 2022 00:52:15 +0300 Subject: [PATCH] working on initial make... Signed-off-by: Alex A. Naanou --- Viewer/Makefile | 18 +++++++----------- Viewer/doc/MAKE | 26 +++++++++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Viewer/Makefile b/Viewer/Makefile index 42b406a3..999ec926 100755 --- a/Viewer/Makefile +++ b/Viewer/Makefile @@ -38,8 +38,9 @@ ## To print full list of user make targets use: ## $ make help ## -## Currently it is not possible to do a make dist on a clean directory, -## this needs to be done in two stages: +## +## In some cases making things may fail on a clean directory, if this +## happens first build the environment and then try again: ## $ make dev ## ... ## $ make dist @@ -136,12 +137,7 @@ #.EXPORT_ALL_VARIABLES: -# XXX for some reason in some contexts bash complains somewhere after -# this point but otherwise works fine: -# - ssh localhost -# - termux on android -# while everything is OK on ubuntu and normal dev context... -SHELL := $(shell which bash) +SHELL := bash # set path to use local tools... # NOTE this does not affect where make is seraching for commands... @@ -524,7 +520,7 @@ web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip electron-dist: ## Make electron distributable electron-dist: VERSION := $(VERSION)-el electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip -electron-dist: dev $$(DIST) +electron-dist: $$(DIST) # add a time stamp to version... @@ -532,7 +528,7 @@ electron-dist: dev $$(DIST) electron-test-dist: ## Make electron test distributable electron-test-dist: VERSION := $(VERSION)-$(DATE)-el electron-test-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip -electron-test-dist: dev $$(DIST) +electron-test-dist: $$(DIST) #electron-test-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip @@ -540,7 +536,7 @@ electron-test-dist: dev $$(DIST) .PHONY: electron-unpacked electron-unpacked: ## Make unpacked electron app electron-unpacked: VERSION := $(VERSION)-el -electron-unpacked: dev $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/ +electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/ #.PHONY: electron-inst diff --git a/Viewer/doc/MAKE b/Viewer/doc/MAKE index 9b6e5386..f549fb5f 100644 --- a/Viewer/doc/MAKE +++ b/Viewer/doc/MAKE @@ -2,7 +2,14 @@ ImageGrid.Viewer Makefile... To print full list of user make targets use: - make help + make help + + +In some cases making things may fail on a clean directory, if this +happens first build the environment and then try again: + make dev + ... + make dist Variables to control the build: @@ -38,21 +45,25 @@ NOTE: cross compilation is at this time not supported, if you try it Examples: # check if all dependencies are available... - make check + make check # make development environment... - make dev + make dev # full build... - make clean dist + make clean dist # build in repack mode... - BUILD_MODE=repack make dist + BUILD_MODE=repack make dist # build for darwin... (EXPERIMENTAL) - TARGET_OS=darwin make clean dist + TARGET_OS=darwin make clean dist +Help and info: + help: Print make target help and exit + version: Print version and exit + Dependency checking: check: Run all dependency checks check-web: Run web build dependency checks @@ -86,9 +97,6 @@ Electron: electron-unpacked: Make unpacked electron app electron-run: Run app in electron -NW: - nw-run: Run app in nw (outdated) - Windows installer: Deb package: