diff --git a/Makefile b/Makefile index 3f0e75d..43bddd3 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,9 @@ .DEFAULT_GOAL := docker-release _UID=$(shell id -u) -TAG_NAME := $(or $(TAG_NAME),$(shell git describe --tags | rev | cut -f3- -d- | rev )) -TAG_NAME_NO_V := $(TAG_NAME:v%=%) -REVISION_ID := $(or $(REVISION_ID),$(shell git describe --tags | rev | cut -f-2 -d- | rev)) +TAG_NAME := $(or $(TAG_NAME),$(shell git describe --tags)) + +METAUML_RELEASE_VERSION := $(TAG_NAME:v%=%) METAUML_RELEASE_DATE := $(shell date "+%B %d, %Y") release: @@ -17,22 +17,23 @@ release: mkdir dist/metauml/doc mkdir dist/metauml/examples mkdir dist/metauml/inputs - sed -e 's/METAUML_RELEASE_VERSION/$(TAG_NAME_NO_V)/' -e 's/METAUML_RELEASE_DATE/$(METAUML_RELEASE_DATE)/' ctan/README >dist/metauml/README - cp manual/metauml-manual.pdf dist/metauml/doc/metauml-manual-$(TAG_NAME)-$(REVISION_ID).pdf + sed -e 's/METAUML_RELEASE_VERSION/$(METAUML_RELEASE_VERSION)/' -e 's/METAUML_RELEASE_DATE/$(METAUML_RELEASE_DATE)/' ctan/README >dist/metauml/README + cp manual/metauml-manual.pdf dist/metauml/doc/metauml-manual-$(TAG_NAME).pdf cp src/*.mp dist/metauml/inputs cp -r manual dist/metauml/examples/ find dist/metauml/examples/ -type f -not -name "*.mp" -not -name "*.tex" -not -name "*.bib" -exec rm {} + -release-tgz: +release-archive: release [ -d dist/archive ] || mkdir -p dist/archive - tar -C dist/ -cvf dist/archive/metauml-$(TAG_NAME)-$(REVISION_ID).tgz metauml + tar -C dist/ -cvf dist/archive/metauml-$(TAG_NAME).tgz metauml clean: - echo "Not implemented" + make -C manual clean docker-release: - docker run -it --rm -eHOME -eUSER -u=$(_UID) \ + (set -x; docker run -it --rm -eHOME -eUSER -u=$(_UID) \ + -eTAG_NAME=$(TAG_NAME) \ -v${HOME}:${HOME} \ -v${PWD}/src:/usr/local/texlive/2017/texmf-dist/metapost/metauml \ blang/latex:ctanfull \ - bash -c "cd ${PWD}; TAG_NAME=$(TAG_NAME) REVISION_ID=$(REVISION_ID) make release" + bash -c "cd ${PWD}; MPINPUTS=${PWD}/src: make release-archive" ) diff --git a/manual/metauml-manual.tex b/manual/metauml-manual.tex index 68c0be0..a11610d 100644 --- a/manual/metauml-manual.tex +++ b/manual/metauml-manual.tex @@ -101,9 +101,9 @@ \section{Introduction} This code creates a visual object, referenced by its name {\code A}, of the MetaUML-defined type {\code Class}. Object {\code A} has the following content properties: a name ({\code MyClass}), a list of attributes ({\code attr1}, {\code attr2}) -and a list of methods ({\code method1}, {\code method2}). To set the object's location, we assign a value to the -so-called ``north-west'' point of the encompassing rectangle, {\code A.nw} --- a point which in actual fact references -the upper-left corner. +and a list of methods ({\code method1}, {\code method2}). To anchor the visual object on the plane, we constrain +its ``north-west'' or upper-left property, {\code A.nw}, to a given point, {\code (0,0)}. Finally, after the +object is defined and positioned, {\code drawObject} is called to handle the actual rendering. Every MetaUML visual object has the layout properties shown in figure \ref{fig:properties}. These properties may be used to set the location of any given object, either by assigning to them absolute values, @@ -132,10 +132,10 @@ \section{Introduction} states can be used. Here is the general pattern used by MetaUML for drawing links: \begin{verbatim} -link()(); +link(