diff --git a/ITG.MakeUtils/TeX/CTAN.mk b/ITG.MakeUtils/TeX/CTAN.mk index 15d2ce69..0d47fb92 100644 --- a/ITG.MakeUtils/TeX/CTAN.mk +++ b/ITG.MakeUtils/TeX/CTAN.mk @@ -178,7 +178,7 @@ $(TDSTARGET) $(CTANTARGET): | .CTAN else $(CTANMAKEFILE): $(MAKEFILE_LIST) - $(info Build intermediate makefile for CTAN: $@) + $(call writeinformation,Building intermediate makefile for CTAN "$@"...) $(MAKETARGETDIR) $(file > $@,# intermediate makefile for CTAN archive) $(file >> $@,SUBMAKE_TEX_CTAN := $(dir $(lastword $(MAKEFILE_LIST)))) @@ -186,6 +186,7 @@ $(CTANMAKEFILE): $(MAKEFILE_LIST) $(foreach ctanfile,$(CTANFILES),$(file >> $@,$(call copyFileToTDSandCTAN,$(ctanfile)))) $(file >> $@,$(call copyFilesToZIP,$(TDSTARGET),,$(LATEXTDSAUXDIR))) $(file >> $@,$(call copyFilesToZIP,$(CTANTARGET),,$(LATEXCTANAUXDIR))) + $(call writeinformation,File "$@" is ready.) $(TDSTARGET) $(CTANTARGET): $(CTANMAKEFILE) $(MAKE) --makefile $(CTANMAKEFILE) $@ diff --git a/ITG.MakeUtils/TeX/gitversion.mk b/ITG.MakeUtils/TeX/gitversion.mk index eb8f5b03..7e5c317f 100644 --- a/ITG.MakeUtils/TeX/gitversion.mk +++ b/ITG.MakeUtils/TeX/gitversion.mk @@ -6,7 +6,7 @@ include $(realpath $(ITG_MAKEUTILS_DIR)/common.mk) include $(realpath $(ITG_MAKEUTILS_DIR)/gitversion.mk) %/version.tex %/version.dtx: $(REPOVERSION) - $(info Generate latex version file "$@"...) + $(call writeinformation,Generating latex version file "$@"...) $(MAKETARGETDIR) @git log -1 --date=format:%Y/%m/%d --format="format:\ %%\iffalse%n\ @@ -24,5 +24,6 @@ include $(realpath $(ITG_MAKEUTILS_DIR)/gitversion.mk) %%\fi%n\ " > $@ touch $@ + $(call writeinformation,File "$@" is ready.) endif \ No newline at end of file diff --git a/ITG.MakeUtils/appveyor.mk b/ITG.MakeUtils/appveyor.mk index e4510b36..2a3e8df0 100644 --- a/ITG.MakeUtils/appveyor.mk +++ b/ITG.MakeUtils/appveyor.mk @@ -16,6 +16,15 @@ POWERSHELLMODULES := $(POWERSHELLMODULES), \ endif +writeinformationaux = \ + Add-AppveyorMessage -Message '$(1)' -Category 'Information' -Details '$(2)' + +writewarningaux = \ + Add-AppveyorMessage -Message '$(1)' -Category 'Warning' -Details '$(2)' + +writeerroraux = \ + Add-AppveyorMessage -Message '$(1)' -Category 'Error' -Details '$(2)' + pushDeploymentArtifactFile = \ Push-AppveyorArtifact $(VERBOSEFLAGS) -DeploymentName '$(1)' -Path '$(2)'; diff --git a/ITG.MakeUtils/chocolatey.mk b/ITG.MakeUtils/chocolatey.mk index a3ff666e..ebf838e1 100644 --- a/ITG.MakeUtils/chocolatey.mk +++ b/ITG.MakeUtils/chocolatey.mk @@ -64,7 +64,7 @@ $$($(1)TARGETS): \ $(wildcard $(SOURCESDIR)/$2/*.ignore) \ $(patsubst %.externalfile.xml,%.$(FILEHASHALGORITHM).checksum.txt,$(wildcard $(SOURCESDIR)/$2/*.externalfile.xml)) \ $6 - $$(info Generate chocolatey package file "$$@"...) + $$(call writeinformation,Generating chocolatey package file "$$@"...) $$(MAKETARGETDIR) cd $$(@D) && $$(CHOCO) \ pack $$(subst $$(SPACE),/,$$(patsubst %,..,$$(subst /,$$(SPACE),$$(@D))))/$$< \ @@ -72,6 +72,7 @@ $$($(1)TARGETS): \ --version $$($(1)VERSION) \ --verbose @touch $$@ + $$(call writeinformation,File "$$@" is ready.) .PHONY: $1 $(1): $$($(1)TARGETS) diff --git a/ITG.MakeUtils/common.mk b/ITG.MakeUtils/common.mk index 7cd234d6..78f25c88 100644 --- a/ITG.MakeUtils/common.mk +++ b/ITG.MakeUtils/common.mk @@ -89,6 +89,45 @@ CURL := curl $(VERBOSEFLAGS) ZIP ?= zip -o -9 TAR ?= tar +# $(call writeinformation, msg, details) +writeinformationaux ?= + +#writeinformationauxII ?= \ +# $(info $(1)) \ +# $(info $(2)) +writeinformationauxII ?= \ + Write-Information '$(1)'; + +writeinformation = \ + $(call writeinformationauxII,$(1),$(2)) \ + $(call writeinformationaux,$(1),$(2)) + +# $(call writewarning, msg, details) +writewarningaux ?= + +#writewarningauxII ?= \ +# $(warning $(1)) \ +# $(info $(2)) +writewarningauxII ?= \ + Write-Warning '$(1)'; + +writewarning = \ + $(call writewarningauxII,$(1),$(2)) \ + $(call writewarningaux,$(1),$(2)) + +# $(call writeerror, msg, details) +writeerroraux ?= + +#writeerrorauxII ?= \ +# $(error $(1)) \ +# $(info $(2)) +writeerrorauxII ?= \ + Write-Error '$(1)'; + +writeerror = \ + $(call writeerrorauxII,$(1),$(2)) \ + $(call writeerroraux,$(1),$(2)) + # $(call setvariable, var, value) define setvariable $1:=$2 diff --git a/ITG.MakeUtils/ghostscript.mk b/ITG.MakeUtils/ghostscript.mk index ed121b40..eb30bafb 100644 --- a/ITG.MakeUtils/ghostscript.mk +++ b/ITG.MakeUtils/ghostscript.mk @@ -25,9 +25,10 @@ GSINCDIR ?= GSFONTDIR ?= $(OUTPUTDIR)/%.pdf: $(SOURCESDIR)/%.ps - $(info Build file "$@" from "$<"...) + $(call writeinformation,Build file "$@" from "$<"...) $(MAKETARGETDIR) $(GS) -sOutputFile='$(call OSPath,$@)' $(foreach incdir,$(GSINCDIR),-I'$(call OSabsPath,$(incdir))') -sFONTPATH='$(call OSabsPath,$(GSFONTDIR))' '$(call OSPath,$<)' + $(call writeinformation,File "$@" is ready.) ifdef MAKE_TESTS_DIR diff --git a/ITG.MakeUtils/gitversion.mk b/ITG.MakeUtils/gitversion.mk index b2440cf2..9bcb6798 100644 --- a/ITG.MakeUtils/gitversion.mk +++ b/ITG.MakeUtils/gitversion.mk @@ -9,9 +9,10 @@ GITVERSION ?= gitversion export GITVERSIONMAKEFILE ?= $(abspath $(AUXDIR)/version.mk) $(GITVERSIONMAKEFILE): $(REPOVERSION) - $(info Generate version data file "$@" with GitVersion...) + $(call writeinformation,Generating version data file "$@" with GitVersion...) $(MAKETARGETDIR) - $(call shellPath,$(GITVERSION)) /exec $(MAKE) /execargs "--makefile=$(MAKE_GITVERSION_DIR)/gitversion-buildcache.mk $@" + $(GITVERSION) /exec $(MAKE) /execargs "--makefile=$(MAKE_GITVERSION_DIR)/gitversion-buildcache.mk $@" + $(call writeinformation,File "$@" is ready.) ifeq ($(filter clean,$(MAKECMDGOALS)),) include $(GITVERSIONMAKEFILE) diff --git a/encodings/Makefile b/encodings/Makefile index 3681d4fb..f6c47f36 100644 --- a/encodings/Makefile +++ b/encodings/Makefile @@ -16,15 +16,17 @@ AGLFNFILE ?= $(call OSabsPath,agl-aglfn/aglfn.txt) # download unicode mappings $(AUXDIR)/MAPPINGS/%.TXT: - $(info Download file "$(@F)"...) + $(call writeinformation,Downloading file "$(@F)"...) $(MAKETARGETDIR) $(CURL) "http://www.unicode.org/Public/MAPPINGS/$*.TXT" -o $(call OSPath,$@) $(TOUCH) $@ + $(call writeinformation,File "$(@F)" is downloaded.) $(OUTPUTDIR)/%.ps: - $(info Create PostScript encoding file "$(@F)" from "$<"...) + $(call writeinformation,Creating PostScript encoding file "$(@F)" from "$<"...) $(MAKETARGETDIR) ./New-PostscriptEncodingTable.ps1 -EncodingSourceFilePath $(call OSPath,$<) -FilePath $(call OSPath,$@) $(VERBOSEFLAGS) + $(call writeinformation,File "$(@F)" is ready.) # $(call mapPSEncodingFileToSource, uri, encoding) define mapPSEncodingFileToSource