iconv: Bail out of the loop when an illegal sequence of bytes occurs.
[elinks/elinks-j605.git] / src / Makefile
blobfb2943c956aacd0ba83eb0129a7a339de1485e00
1 top_builddir=..
2 include $(top_builddir)/Makefile.config
4 SUBDIRS-$(CONFIG_BOOKMARKS) += bookmarks
5 SUBDIRS-$(CONFIG_COOKIES) += cookies
6 SUBDIRS-$(CONFIG_DOM) += dom
7 SUBDIRS-$(CONFIG_ECMASCRIPT) += ecmascript
8 SUBDIRS-$(CONFIG_FORMHIST) += formhist
9 SUBDIRS-$(CONFIG_GLOBHIST) += globhist
10 SUBDIRS-$(CONFIG_SCRIPTING) += scripting
12 SUBDIRS = \
13 bfu \
14 cache \
15 config \
16 dialogs \
17 document \
18 encoding \
19 intl \
20 main \
21 mime \
22 network \
23 osdep \
24 protocol \
25 session \
26 terminal \
27 util \
28 viewer
30 # Get the GIT HEAD ID if possible
31 ifdef GIT
32 GITDESC = $(shell $(GIT) --git-dir=$(top_srcdir)/.git rev-parse HEAD 2>/dev/null)
33 WTDIRTY = $(shell cd "$(top_srcdir)" && $(GIT) diff-index HEAD 2>/dev/null)
34 BUILD_ID = $(subst elinks-,,$(GITDESC))$(if $(WTDIRTY),-dirty)
35 endif
36 INCLUDES += -DBUILD_ID="\"$(BUILD_ID)\""
38 vernum.o: $(LIB_O_NAME)
40 elinks$(EXEEXT): $(LIB_O_NAME) vernum.o
41 $(call cmd,link)
43 # Place the TAGS file in the source directory so that, if the same
44 # source is built for different configurations in different build
45 # directories, one doesn't have to remember which of those build
46 # directories has the most recent TAGS.
47 TAGS:
48 cd $(firstword $(srcdir) .) \
49 && find . \( -name "*.[ch]" -o -name "*.inc" \) -print \
50 | etags --regex='{c}/\(?:static \)?INIT_LIST_OF([^,]*,[ \t]*\([[:alnum:]_]+\))/\1/' \
51 --regex='{c}/struct_hierbox_browser(\n[ \t]*\([[:alnum:]_]+\),/\1/m' \
52 --regex='{c}/^ACTION_(\([[:alnum:]_]+\),[^,]*,[ \t]*\([[:alnum:]_]+\),/ACT_\1_\2/' \
53 --language=c -
55 tags:
56 cd $(firstword $(srcdir) .) \
57 && find . \( -name "*.[ch]" -o -name "*.inc" \) -print \
58 | ctags -L -
60 .PHONY: TAGS tags
62 PROGS = elinks$(EXEEXT)
63 CLEAN = vernum.o TAGS tags
65 include $(top_srcdir)/Makefile.lib