vscode: hard-code a couple defines
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 30 Jul 2018 15:42:48 +0000 (08:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Jul 2018 20:14:38 +0000 (13:14 -0700)
Sadly, we do not get all of the definitions via ALL_CFLAGS. Some defines
are passed to GCC *only* when compiling specific files, such as git.o.

Let's just hard-code them into the script for the time being.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/vscode/init.sh
index 3cc93243f59cf2e862021a1dd559578944bab5ba..494a51ac55320aeebfbbea355524fc5b54c0da91 100755 (executable)
@@ -115,7 +115,19 @@ include Makefile
 vscode-init:
        @mkdir -p .vscode && \
        incs= && defs= && \
-       for e in $(ALL_CFLAGS); do \
+       for e in $(ALL_CFLAGS) \
+                       '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
+                       '-DGIT_LOCALE_PATH="$(localedir_relative_SQ)"' \
+                       '-DBINDIR="$(bindir_relative_SQ)"' \
+                       '-DFALLBACK_RUNTIME_PREFIX="$(prefix_SQ)"' \
+                       '-DDEFAULT_GIT_TEMPLATE_DIR="$(template_dir_SQ)"' \
+                       '-DETC_GITCONFIG="$(ETC_GITCONFIG_SQ)"' \
+                       '-DETC_GITATTRIBUTES="$(ETC_GITATTRIBUTES_SQ)"' \
+                       '-DGIT_LOCALE_PATH="$(localedir_relative_SQ)"' \
+                       '-DCURL_DISABLE_TYPECHECK', \
+                       '-DGIT_HTML_PATH="$(htmldir_relative_SQ)"' \
+                       '-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \
+                       '-DGIT_INFO_PATH="$(infodir_relative_SQ)"'; do \
                case "$$e" in \
                -I.) \
                        incs="$$(printf '% 16s"$${workspaceRoot}",\n%s' \