Check-in [7d25632786]
Overview
Comment:Add "compile_commands.json" to build process
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug/tsmf-bug-fixes
Files: files | file ages | folders
SHA1: 7d256327863ce9a88da2da00b6fe39edb746494a
User & Date: rkeene on 2024-03-05 20:41:53
Other Links: branch diff | manifest | tags
Context
2024-03-05
20:42
Fix some issues with TUAPI TSMF functions Closed-Leaf check-in: a39fa02e97 user: rkeene tags: bug/tsmf-bug-fixes
20:41
Add "compile_commands.json" to build process check-in: 7d25632786 user: rkeene tags: bug/tsmf-bug-fixes
20:04
Create new branch named "bug/tsmf-bug-fixes" check-in: e3b90d3c3e user: rkeene tags: bug/tsmf-bug-fixes
Changes

Modified .fossil-settings/ignore-glob from [8823994c8d] to [06351b337f].

1
2
3
4
5

tuapi.so
libtuapi.a
tuapi.o
tuapi.tcl.h
pkgIndex.tcl






>
1
2
3
4
5
6
tuapi.so
libtuapi.a
tuapi.o
tuapi.tcl.h
pkgIndex.tcl
compile_commands.json

Modified build-dyn.sh from [58689ba4b3] to [b25814ea59].


1












2
3
4
5
6
7
8
9
10
11
12
13

























14

15
16

# /bin/bash













# Perform common build options
. ./build-common.sh

# Compile using the same options as Tcl
if [ -z "${TCLCONFIGSH}" ]; then
	TCLCONFIGSH="$(find /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /lib /lib64 -name tclConfig.sh -print -quit)"
fi

. "${TCLCONFIGSH}"

echo "${TCL_CC} -ggdb3 -fPIC -DPIC -Wall -DUSE_TCL_STUBS=1 ${TCL_DEFS} ${TCL_INCLUDE_SPEC} -shared -rdynamic -o tuapi.so tuapi.c ${TCL_STUB_LIB_SPEC}"

























eval ${TCL_CC} -ggdb3 -fPIC -DPIC -Wall -DUSE_TCL_STUBS=1 ${TCL_DEFS} ${TCL_INCLUDE_SPEC} -shared -rdynamic -o tuapi.so tuapi.c ${TCL_STUB_LIB_SPEC}


echo 'package ifneeded tuapi '"${tuapi_version}"' [list load [file join $dir tuapi.so]]' > pkgIndex.tcl
>
|
>
>
>
>
>
>
>
>
>
>
>
>












>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /usr/bin/env bash

bashArrayToJSON() (
	args=("$@")

	jq -M -r -n -c --args '$ARGS.positional' --args -- "${args[@]}"
)

bashStringToJSON() (
	string="$1"

	eval "tmpArray=($string)"
	bashArrayToJSON "${tmpArray[@]}"
)

# Perform common build options
. ./build-common.sh

# Compile using the same options as Tcl
if [ -z "${TCLCONFIGSH}" ]; then
	TCLCONFIGSH="$(find /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /lib /lib64 -name tclConfig.sh -print -quit)"
fi

. "${TCLCONFIGSH}"

echo "${TCL_CC} -ggdb3 -fPIC -DPIC -Wall -DUSE_TCL_STUBS=1 ${TCL_DEFS} ${TCL_INCLUDE_SPEC} -shared -rdynamic -o tuapi.so tuapi.c ${TCL_STUB_LIB_SPEC}"

cat << _EOF_ > compile_commands.json.new
[
	{
		"directory": "$(pwd)",
		"file": "tuapi.c",
		"arguments": [
			"$(echo "${TCL_CC}" | sed 's@ @", "@g')",
			"-ggdb3",
			"-fPIC",
			"-DPIC",
			"-Wall",
			"-DUSE_TCL_STUBS=1",
			$(bashStringToJSON "${TCL_DEFS}" | sed 's@^\[@@;s@\]$@@'),
			$(bashStringToJSON "${TCL_INCLUDE_SPEC}" | sed 's@^\[@@;s@\]$@@'),
			"-shared",
			"-rdynamic",
			"-o",
			"tuapi.so",
			"tuapi.c"
		]
	}
]
_EOF_

eval ${TCL_CC} -ggdb3 -fPIC -DPIC -Wall -DUSE_TCL_STUBS=1 ${TCL_DEFS} ${TCL_INCLUDE_SPEC} -shared -rdynamic -o tuapi.so tuapi.c ${TCL_STUB_LIB_SPEC} || exit 1
mv compile_commands.json.new compile_commands.json

echo 'package ifneeded tuapi '"${tuapi_version}"' [list load [file join $dir tuapi.so]]' > pkgIndex.tcl