mirror of
https://github.com/vim/vim
synced 2025-05-02 22:37:47 +02:00
When a syntax file is changed, timestamps of the corresponding files are updated. NOTE: At the moment this script does not strictly track dependency, like cpp on c. Also update ignore files closes #16548 Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
38 lines
1.1 KiB
Bash
Executable file
38 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
# This script generates auxiliary recipes for 'make test': e.g. in the case of JAVA,
|
|
# - a phony target 'java' depends on all of the testdir/input/java*.java
|
|
# - when the syntax file is changed, timestamps of the JAVA files are updated so that the tests will
|
|
# be rerun against updated syntax
|
|
# - when a vim setup file for test, e.g. testdir/input/setup/java_module_info.vim, is changed,
|
|
# timestamp of the corresponding input, testdir/input/java_module_info.java, is updated
|
|
#
|
|
# NOTE: At the moment this script DOES NOT strictly track dependency, like cpp on c, so run
|
|
# `make clean test` before deployment
|
|
|
|
set -eu +f -o pipefail
|
|
|
|
cd "$(dirname "$0")"/../..
|
|
for input in testdir/input/*.*; do
|
|
dirname=$(dirname "$input")
|
|
basename=$(basename "$input")
|
|
|
|
case "$basename" in
|
|
vim9_*.*) ft=vim;;
|
|
*_*.*) ft=${basename%%_*};;
|
|
*.*) ft=${basename%%.*};;
|
|
*) exit 1
|
|
esac
|
|
|
|
vimsetup=$dirname/setup/${basename%.*}.vim
|
|
if [ ! -r "$vimsetup" ]; then
|
|
vimsetup=
|
|
fi
|
|
|
|
cat << EOF
|
|
$input: $ft.vim $vimsetup
|
|
touch -c \$@
|
|
$basename:: $input
|
|
$ft:: $basename
|
|
|
|
EOF
|
|
done
|