Skip to content

Commit eedee15

Browse files
authored
Merge branch 'master' into optscript-docs
2 parents da2777b + 50e7a74 commit eedee15

File tree

1,765 files changed

+122004
-14639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,765 files changed

+122004
-14639
lines changed

.editorconfig

+8-6
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,39 @@ insert_final_newline = true
88
indent_size = 4
99
indent_style = tab
1010
trim_trailing_whitespace = true
11+
tab_width = 4
1112

1213
[misc/packcc/packcc.c]
1314
indent_size = 4
1415
indent_style = space
1516
trim_trailing_whitespace = true
17+
tab_width = 4
1618

1719
[*.{ctags,ps}]
1820
indent_size = 4
1921
indent_style = space
2022
trim_trailing_whitespace = true
23+
tab_width = 4
2124

22-
[*.mak]
25+
[{Makefile*,*.mak}]
2326
indent_size = 8
2427
indent_style = tab
2528
trim_trailing_whitespace = true
29+
tab_width = 8
2630

2731
[*.rst*]
2832
indent_size = 4
2933
indent_style = tab
3034
trim_trailing_whitespace = true
35+
tab_width = 4
3136

32-
[fnmatch/*.{c,h}]
33-
tab_width = 8
34-
35-
[gnu_regex/*.{c,h}]
37+
[gnulib/*.{c,h}]
3638
tab_width = 8
3739

3840
[misc/optlib2c]
3941
trim_trailing_whitespace = true
4042

41-
[win32/*]
43+
[win32/*.{bat,sln,vcxproj,vcxproj.filters}]
4244
end_of_line = crlf
4345

4446
[win32/*.vcxproj*]

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text=auto
2+
3+
/win32/*.bat text eol=crlf
4+
/win32/*.sln text eol=crlf
5+
/win32/*.vcxproj text eol=crlf
6+
/win32/*.vcxproj.filters text eol=crlf
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cross compile with android-ndk
1+
name: cross compile with android-ndk on mac
22

33
on:
44
push:
@@ -11,62 +11,69 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
build-machine-os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15]
14+
build-machine-os: [macos-12, macos-11]
1515

1616
runs-on: ${{ matrix.build-machine-os }}
1717

1818
steps:
1919
- uses: actions/checkout@v2
20-
20+
2121
- run: brew install gcc make automake autoconf file
22-
22+
2323
- run: ./autogen.sh
2424

2525
- name: Run ./configure ...
2626
run: |
27+
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-3
28+
[ -n "$ANDROID_NDK_LATEST_HOME" ] && {
29+
export ANDROID_NDK_HOME="$ANDROID_NDK_LATEST_HOME"
30+
export ANDROID_NDK_ROOT="$ANDROID_NDK_LATEST_HOME"
31+
}
32+
2733
BUILD_MACHINE_OS_TYPE=$(uname | tr A-Z a-z)
2834
BUILD_MACHINE_OS_ARCH=$(uname -m)
2935
3036
TOOLCHAIN_BASE_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$BUILD_MACHINE_OS_TYPE-$BUILD_MACHINE_OS_ARCH
3137
TOOLCHAIN_BIN_DIR=$TOOLCHAIN_BASE_DIR/bin
3238
SYSROOT=$TOOLCHAIN_BASE_DIR/sysroot
33-
39+
3440
export CC=$TOOLCHAIN_BIN_DIR/armv7a-linux-androideabi21-clang
35-
export AR=$TOOLCHAIN_BIN_DIR/arm-linux-androideabi-ar
36-
export RANLIB=$TOOLCHAIN_BIN_DIR/arm-linux-androideabi-ranlib
41+
export AR=$TOOLCHAIN_BIN_DIR/llvm-ar
42+
export RANLIB=$TOOLCHAIN_BIN_DIR/llvm-ranlib
3743
3844
export CFLAGS="--sysroot $SYSROOT -Qunused-arguments -Os -fpic"
3945
export CPPFLAGS="--sysroot $SYSROOT -Qunused-arguments"
4046
export LDFLAGS="--sysroot $SYSROOT"
41-
47+
4248
TARGET=armv7a-linux-androideabi
43-
49+
4450
COLOR_PURPLE='\033[0;35m' # Purple
4551
COLOR_GREEN='\033[0;32m' # Green
4652
COLOR_OFF='\033[0m' # Reset
47-
53+
4854
echo() {
4955
printf "%b\n" "$*"
5056
}
51-
57+
5258
run() {
5359
echo "$COLOR_PURPLE==>$COLOR_OFF $COLOR_GREEN$@$COLOR_OFF"
5460
eval "$*"
5561
}
56-
62+
5763
run ./configure \
5864
--host=$TARGET \
5965
--disable-iconv \
6066
--disable-xml \
6167
--disable-json \
6268
--disable-yaml \
69+
--disable-pcre2 \
6370
CC="$CC" \
6471
CFLAGS="\"$CFLAGS\"" \
6572
CPPFLAGS="\"$CPPFLAGS\"" \
6673
LDFLAGS="\"$LDFLAGS\"" \
6774
AR=$AR \
6875
RANLIB=$RANLIB
69-
76+
7077
- run: make V=1
71-
72-
- run: file ctags | grep 'ELF 32-bit LSB shared object, ARM, EABI5'
78+
79+
- run: file ctags | grep 'ELF 32-bit LSB pie executable, ARM, EABI5'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: cross compile with android-ndk on ubuntu
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
cross-compile:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
build-machine-os: [ubuntu-22.04, ubuntu-20.04]
15+
16+
runs-on: ${{ matrix.build-machine-os }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- run: sudo apt-get -y -o APT::Immediate-Configure=false update
22+
- run: sudo apt-get -y -o APT::Immediate-Configure=false install gcc make automake autoconf file
23+
24+
- run: ./autogen.sh
25+
26+
- name: Run ./configure ...
27+
run: |
28+
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-3
29+
[ -n "$ANDROID_NDK_LATEST_HOME" ] && {
30+
export ANDROID_NDK_HOME="$ANDROID_NDK_LATEST_HOME"
31+
export ANDROID_NDK_ROOT="$ANDROID_NDK_LATEST_HOME"
32+
}
33+
34+
BUILD_MACHINE_OS_TYPE=$(uname | tr A-Z a-z)
35+
BUILD_MACHINE_OS_ARCH=$(uname -m)
36+
37+
TOOLCHAIN_BASE_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$BUILD_MACHINE_OS_TYPE-$BUILD_MACHINE_OS_ARCH
38+
TOOLCHAIN_BIN_DIR=$TOOLCHAIN_BASE_DIR/bin
39+
SYSROOT=$TOOLCHAIN_BASE_DIR/sysroot
40+
41+
export CC=$TOOLCHAIN_BIN_DIR/armv7a-linux-androideabi21-clang
42+
export AR=$TOOLCHAIN_BIN_DIR/llvm-ar
43+
export RANLIB=$TOOLCHAIN_BIN_DIR/llvm-ranlib
44+
45+
export CFLAGS="--sysroot $SYSROOT -Qunused-arguments -Os -fpic"
46+
export CPPFLAGS="--sysroot $SYSROOT -Qunused-arguments"
47+
export LDFLAGS="--sysroot $SYSROOT"
48+
49+
TARGET=armv7a-linux-androideabi
50+
51+
COLOR_PURPLE='\033[0;35m' # Purple
52+
COLOR_GREEN='\033[0;32m' # Green
53+
COLOR_OFF='\033[0m' # Reset
54+
55+
echo() {
56+
printf "%b\n" "$*"
57+
}
58+
59+
run() {
60+
echo "$COLOR_PURPLE==>$COLOR_OFF $COLOR_GREEN$@$COLOR_OFF"
61+
eval "$*"
62+
}
63+
64+
run ./configure \
65+
--host=$TARGET \
66+
--disable-iconv \
67+
--disable-xml \
68+
--disable-json \
69+
--disable-yaml \
70+
--disable-pcre2 \
71+
CC="$CC" \
72+
CFLAGS="\"$CFLAGS\"" \
73+
CPPFLAGS="\"$CPPFLAGS\"" \
74+
LDFLAGS="\"$LDFLAGS\"" \
75+
AR=$AR \
76+
RANLIB=$RANLIB
77+
78+
- run: make V=1
79+
80+
# pie executable or shared object
81+
- run: file ctags | grep 'ELF 32-bit LSB .*, ARM, EABI5'

.github/workflows/cross-compile-mingw-w64.yml renamed to .github/workflows/cross-compile-mingw-w64-on-mac.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cross compile with mingw-w64
1+
name: cross compile with mingw-w64 on mac
22

33
on:
44
push:
@@ -11,14 +11,14 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
build-machine-os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15]
14+
build-machine-os: [macos-12, macos-11]
1515
target: [i686-w64-mingw32,x86_64-w64-mingw32]
1616

1717
runs-on: ${{ matrix.build-machine-os }}
1818

1919
steps:
2020
- uses: actions/checkout@v2
21-
21+
2222
- run: brew install mingw-w64 gcc make automake autoconf file
2323

2424
- run: ./autogen.sh
@@ -31,12 +31,13 @@ jobs:
3131
--disable-xml \
3232
--disable-json \
3333
--disable-yaml \
34+
--disable-pcre2 \
3435
CC=${{ matrix.target }}-gcc \
3536
CFLAGS='-v' \
3637
AR=${{ matrix.target }}-ar \
3738
RANLIB=${{ matrix.target }}-ranlib \
3839
WINDRES=${{ matrix.target }}-windres
39-
40+
4041
- run: make V=1
41-
42+
4243
- run: file ctags.exe | grep PE32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: cross compile with mingw-w64 on ubuntu
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
cross-compile:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
build-machine-os: [ubuntu-22.04, ubuntu-20.04]
15+
target: [i686-w64-mingw32,x86_64-w64-mingw32]
16+
17+
runs-on: ${{ matrix.build-machine-os }}
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- run: sudo apt-get -y -o APT::Immediate-Configure=false update
23+
- run: sudo apt-get -y -o APT::Immediate-Configure=false install mingw-w64 gcc make automake autoconf file
24+
25+
- run: ./autogen.sh
26+
27+
- name: Run ./configure ...
28+
run: |
29+
./configure \
30+
--host=${{ matrix.target }} \
31+
--disable-iconv \
32+
--disable-xml \
33+
--disable-json \
34+
--disable-yaml \
35+
--disable-pcre2 \
36+
CC=${{ matrix.target }}-gcc \
37+
CFLAGS='-v' \
38+
AR=${{ matrix.target }}-ar \
39+
RANLIB=${{ matrix.target }}-ranlib \
40+
WINDRES=${{ matrix.target }}-windres
41+
42+
- run: make V=1
43+
44+
- run: file ctags.exe | grep PE32

.github/workflows/run-citre-tests.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Citre (https://github.com/universal-ctags/citre) is a readtags frontend for
2+
# Emacs. This workflow runs unit tests of Citre to make sure changes in
3+
# readtags doesn't break the behavior that Citre expects.
4+
5+
# Ref: https://github.com/universal-ctags/citre/issues/58#issuecomment-846229409
6+
7+
name: run Citre tests on GNU/Linux
8+
9+
on:
10+
push:
11+
branches: [ master ]
12+
pull_request:
13+
branches: [ master ]
14+
15+
jobs:
16+
testing:
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
CC: gcc
21+
READTAGS: '${{ github.workspace }}/readtags'
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: update package information
26+
run: sudo apt-get -y -o APT::Immediate-Configure=false update
27+
- name: install tools and libraries
28+
run: sudo apt-get -y -o APT::Immediate-Configure=false install pkg-config automake libjansson-dev libyaml-dev libseccomp-dev libxml2-dev
29+
- name: autogen.sh
30+
run: ./autogen.sh
31+
- name: report the version of cc
32+
run: $CC --version
33+
- name: report the version of make
34+
run: make --version
35+
- name: configure
36+
run: ./configure
37+
- name: make
38+
run: make
39+
- name: report features
40+
run: ./ctags --list-features
41+
- name: install Emacs
42+
run: sudo apt-get -y -o APT::Immediate-Configure=false install emacs
43+
- name: checkout Citre repo
44+
uses: actions/checkout@v2
45+
with:
46+
repository: 'universal-ctags/citre'
47+
path: 'citre'
48+
- name: run Citre unit tests for tags backend
49+
working-directory: 'citre'
50+
run: make test-tags

.github/workflows/testing-alpine.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
tag: ['3.10','3.11','3.12','3.13']
14+
tag: ['3.15','3.14','3.12','3.13']
1515

1616
runs-on: ubuntu-20.04
1717

@@ -20,6 +20,9 @@ jobs:
2020
steps:
2121
- run: apk add libc-dev gcc make automake autoconf pkgconf python3 file diffutils git
2222

23+
# this is to fix https://github.com/actions/checkout/issues/760
24+
- run: git config --global --add safe.directory /__w/ctags/ctags
25+
2326
- uses: actions/checkout@v2
2427

2528
- run: cc --version
@@ -30,5 +33,5 @@ jobs:
3033
- run: make install
3134
- run: file /usr/bin/ctags
3235
- run: ctags --version
33-
- run: make check V=1 APPVEYOR=1
36+
- run: make check V=1
3437
- run: make roundtrip

0 commit comments

Comments
 (0)