Skip to content

Commit

Permalink
make: Re-generate %.texi if HEAD changed since previous run
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Aug 17, 2024
1 parent 8d38508 commit d422802
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/docs/*.info
/docs/*.pdf
/docs/*.texi
/docs/.revdesc
/docs/dir
/docs/stats/

Expand Down
1 change: 1 addition & 0 deletions default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ DOMAIN ?= emacsmirror.net
CFRONT_DIST ?= E1IXJGPIOM4EUW

VERSION ?= $(shell test -e $(TOP).git && git describe --tags --abbrev=0 | cut -c2-)
REVDESC := $(shell test -e $(TOP).git && git describe --tags)

EMACS ?= emacs
EMACS_ARGS ?=
Expand Down
6 changes: 5 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ redo-docs:
@touch $(PKG).org
@make docs

%.texi: %.org
.revdesc: ;
_ := $(shell test "$(REVDESC)" = "$$(cat .revdesc 2> /dev/null)" ||\
echo "$(REVDESC)" > .revdesc)

%.texi: %.org .revdesc
@printf "Generating $@\n"
@$(EMACS) $(ORG_ARGS) $< $(ORG_EVAL)

Expand Down

0 comments on commit d422802

Please sign in to comment.