Root/common/Makefile.title

Source at commit 0b75a76ea3ad27d1a8d2bd68200d37c2f24b809a created 9 years 9 months ago.
By Werner Almesberger, components/inductor.lib: general inductor, reusing filter.lib by Adam Wang
1SHELL = /bin/bash
2
3COMMIT_DATE := $(shell date -u +'%F %T UTC' \
4    -d "`git show --pretty=format:'%ci' | sed q`")
5GIT_HASH := $(shell git rev-parse HEAD)
6GIT_STATUS := $(shell [ -z "`git status -s -uno`" ] || echo +)
7
8.PHONY: title.ps
9
10title.ps: ../common/title.fig
11        fig2dev -L ps $< | \
12            sed -e "s|<TITLE-NAME>|$(TITLE_NAME)|" \
13            -e "s/<DATE>/`date -u +'%F %T UTC'`/" \
14                -e "s/<HEAD-HASH>/$(GIT_HASH)$(GIT_STATUS)/" \
15                -e "s/<HEAD-DATE>/$(COMMIT_DATE)/" \
16            -e "s|<TITLE-FILE>|$(TITLE_FILE)|" >$@; \
17        [ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $@ exit 1; }
18

Archive Download this file

Branches:
master



interactive