summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2010-08-17 09:24:39 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-08-18 14:06:54 -0700
commita997bf423d4baac5b2286edccd1cef897108397f (patch)
treeddea78c3d0fa422aaac324598ef3b5fe75d154bb /Makefile
parentcompat/regex: use the regex engine from gawk for compat (diff)
downloadtgif-a997bf423d4baac5b2286edccd1cef897108397f.tar.xz
compat/regex: get the gawk regex engine to compile within git
We need to define -DGAWK -DNO_MBSUPPORT so that the gawk regex engine will compile, and include stdio.h and stddef.h in regex.h. Gawk itself includes these headers before it includes the regex.h header. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bc3c57058f..09b03c0033 100644
--- a/Makefile
+++ b/Makefile
@@ -1878,6 +1878,10 @@ ifdef NO_EXPAT
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif
+ifdef NO_REGEX
+compat/regex/regex.o: EXTRA_CPPFLAGS = -DGAWK -DNO_MBSUPPORT
+endif
+
git-%$X: %.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)