File: Makefile

package info (click to toggle)
elinks 0.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,424 kB
  • sloc: ansic: 174,653; cpp: 31,967; sh: 7,841; python: 4,039; perl: 2,183; javascript: 1,794; pascal: 1,710; makefile: 1,006; yacc: 295; lisp: 125; awk: 79; ruby: 70
file content (65 lines) | stat: -rw-r--r-- 1,702 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
top_builddir=..
include $(top_builddir)/Makefile.config

SUBDIRS-$(CONFIG_BOOKMARKS)	+= bookmarks
SUBDIRS-$(CONFIG_COOKIES)	+= cookies
SUBDIRS-$(CONFIG_DOM)		+= dom
SUBDIRS-$(CONFIG_ECMASCRIPT)	+= js
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 cd "$(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$(EXEEXT): $(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$(EXEEXT)
CLEAN = vernum.o TAGS tags

include $(top_srcdir)/Makefile.lib