Skip to content

Commit dee3382

Browse files
dschogitster
authored andcommitted
vscode: hard-code a couple defines
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>
1 parent 54c06c6 commit dee3382

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

contrib/vscode/init.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,19 @@ include Makefile
115115
vscode-init:
116116
@mkdir -p .vscode && \
117117
incs= && defs= && \
118-
for e in $(ALL_CFLAGS); do \
118+
for e in $(ALL_CFLAGS) \
119+
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
120+
'-DGIT_LOCALE_PATH="$(localedir_relative_SQ)"' \
121+
'-DBINDIR="$(bindir_relative_SQ)"' \
122+
'-DFALLBACK_RUNTIME_PREFIX="$(prefix_SQ)"' \
123+
'-DDEFAULT_GIT_TEMPLATE_DIR="$(template_dir_SQ)"' \
124+
'-DETC_GITCONFIG="$(ETC_GITCONFIG_SQ)"' \
125+
'-DETC_GITATTRIBUTES="$(ETC_GITATTRIBUTES_SQ)"' \
126+
'-DGIT_LOCALE_PATH="$(localedir_relative_SQ)"' \
127+
'-DCURL_DISABLE_TYPECHECK', \
128+
'-DGIT_HTML_PATH="$(htmldir_relative_SQ)"' \
129+
'-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \
130+
'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'; do \
119131
case "$$e" in \
120132
-I.) \
121133
incs="$$(printf '% 16s"$${workspaceRoot}",\n%s' \

0 commit comments

Comments
 (0)