1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00
elinks/src/Makefile
Kalle Olavi Niemitalo 747b32b735 BUILD_ID: Show the full SHA-1, instead of git describe.
Git describe happily picks whatever annotated tag is closest to the
commit.  I make use of many annotated tags that correspond not to
ELinks releases but rather to patches posted in bugzilla or sent in
email.  So with git describe, the About window can display e.g.
"email/witekfl/2008-02-29-2-g705acfa-dirty", which is not the intended
use of this tag.

In the "next" branch of git.git, git describe apparently supports a
--match option with which it could be made to consider ELinks releases
only.  However, that option is not yet in any released version of Git,
and anyhow ELinks should support older versions too.

Instead of using git describe, just show the full SHA-1, like
cg-commit-id would.  The About dialog box also displays VERSION
from configure.in, so it isn't even particularly useful to show
the name of the latest tag.  (The commit count might help though.)
2008-03-01 14:01:28 +02:00

66 lines
1.7 KiB
Makefile

top_builddir=..
include $(top_builddir)/Makefile.config
SUBDIRS-$(CONFIG_BOOKMARKS) += bookmarks
SUBDIRS-$(CONFIG_COOKIES) += cookies
SUBDIRS-$(CONFIG_DOM) += dom
SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
SUBDIRS-$(CONFIG_FORMHIST) += formhist
SUBDIRS-$(CONFIG_GLOBHIST) += globhist
SUBDIRS-$(CONFIG_SCRIPTING) += scripting
SUBDIRS = \
bfu \
cache \
config \
dialogs \
document \
encoding \
intl \
main \
mime \
network \
osdep \
protocol \
session \
terminal \
util \
viewer
# Get the GIT HEAD ID if possible
ifdef GIT
GITDESC = $(shell $(GIT) --git-dir=$(top_srcdir)/.git rev-parse HEAD 2>/dev/null)
WTDIRTY = $(shell $(GIT) --git-dir=$(top_srcdir)/.git diff-index HEAD 2>/dev/null)
BUILD_ID = $(subst elinks-,,$(GITDESC))$(if $(WTDIRTY),-dirty)
endif
INCLUDES += -DBUILD_ID="\"$(BUILD_ID)\""
vernum.o: $(LIB_O_NAME)
elinks: $(LIB_O_NAME) vernum.o
$(call cmd,link)
# Place the TAGS file in the source directory so that, if the same
# source is built for different configurations in different build
# directories, one doesn't have to remember which of those build
# directories has the most recent TAGS.
TAGS:
cd $(firstword $(srcdir) .) \
&& find . \( -name "*.[ch]" -o -name "*.inc" \) -print \
| etags --regex='{c}/\(?:static \)?INIT_LIST_OF([^,]*,[ \t]*\([[:alnum:]_]+\))/\1/' \
--regex='{c}/struct_hierbox_browser(\n[ \t]*\([[:alnum:]_]+\),/\1/m' \
--regex='{c}/^ACTION_(\([[:alnum:]_]+\),[^,]*,[ \t]*\([[:alnum:]_]+\),/ACT_\1_\2/' \
--language=c -
tags:
cd $(firstword $(srcdir) .) \
&& find . \( -name "*.[ch]" -o -name "*.inc" \) -print \
| ctags -L -
.PHONY: TAGS tags
PROGS = elinks
CLEAN = vernum.o TAGS tags
include $(top_srcdir)/Makefile.lib