mirror of
https://github.com/git/git.git
synced 2026-02-28 10:47:33 +00:00
Merge branch 'dk/meson-regen-config-list' into jch
Fix dependency screw-up in meson-based builds * dk/meson-regen-config-list: build: regenerate config-list.h when Documentation changes
This commit is contained in:
5
Makefile
5
Makefile
@@ -2691,9 +2691,10 @@ $(BUILT_INS): git$X
|
||||
cp $< $@
|
||||
|
||||
config-list.h: generate-configlist.sh
|
||||
@mkdir -p .depend
|
||||
$(QUIET_GEN)$(SHELL_PATH) ./generate-configlist.sh . $@ .depend/config-list.h.d
|
||||
|
||||
config-list.h: Documentation/*config.adoc Documentation/config/*.adoc
|
||||
$(QUIET_GEN)$(SHELL_PATH) ./generate-configlist.sh . $@
|
||||
-include .depend/config-list.h.d
|
||||
|
||||
command-list.h: generate-cmdlist.sh command-list.txt
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
SOURCE_DIR="$1"
|
||||
OUTPUT="$2"
|
||||
DEPFILE="$3"
|
||||
|
||||
if test -z "$SOURCE_DIR" || ! test -d "$SOURCE_DIR" || test -z "$OUTPUT"
|
||||
then
|
||||
echo >&2 "USAGE: $0 <SOURCE_DIR> <OUTPUT>"
|
||||
echo >&2 "USAGE: $0 <SOURCE_DIR> <OUTPUT> [<DEPFILE>]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -36,3 +37,11 @@ EOF
|
||||
echo
|
||||
print_config_list
|
||||
} >"$OUTPUT"
|
||||
|
||||
if test -n "$DEPFILE"
|
||||
then
|
||||
QUOTED_OUTPUT="$(printf '%s\n' "$OUTPUT" | sed 's,[&/\],\\&,g')"
|
||||
printf '%s\n' "$SOURCE_DIR"/Documentation/*config.adoc \
|
||||
"$SOURCE_DIR"/Documentation/config/*.adoc |
|
||||
sed -e 's/[# ]/\\&/g' -e "s/^/$QUOTED_OUTPUT: /" >"$DEPFILE"
|
||||
fi
|
||||
|
||||
@@ -722,11 +722,14 @@ endif
|
||||
|
||||
builtin_sources += custom_target(
|
||||
output: 'config-list.h',
|
||||
depfile: 'config-list.h.d',
|
||||
depend_files: [ 'generate-configlist.sh' ],
|
||||
command: [
|
||||
shell,
|
||||
meson.current_source_dir() + '/generate-configlist.sh',
|
||||
meson.current_source_dir() / 'generate-configlist.sh',
|
||||
meson.current_source_dir(),
|
||||
'@OUTPUT@',
|
||||
'@DEPFILE@',
|
||||
],
|
||||
env: script_environment,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user