Check-in [def9a63955]
Overview
Comment:Updated to have working Makefile
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: def9a63955aec548955cc40ded068a8a67aa6acf
User & Date: rkeene on 2014-10-24 20:28:17
Other Links: manifest | tags
Context
2014-10-25
03:33
Added release engineering script check-in: 111f0e06e0 user: rkeene tags: trunk
2014-10-24
20:28
Updated to have working Makefile check-in: def9a63955 user: rkeene tags: trunk
20:13
Completed rename check-in: 5d8baf9914 user: rkeene tags: trunk
Changes

Added Makefile version [58a300218f].





























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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
TUAPI_VERSION = $(shell ./build-common.sh version)
TCLCONFIGSH = $(shell find /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /lib /lib64 -name tclConfig.sh -print -quit)
TCL_PACKAGE_PATH = $(shell . "$(TCLCONFIGSH)"; echo "$${TCL_PACKAGE_PATH}" | tr ' ' $$'\n' | grep -v '^ *$$' | head -n 1)
PACKAGE_INSTALL_DIR = $(TCL_PACKAGE_PATH)/tuapi-$(TUAPI_VERSION)

export TCLCONFIGSH

all: tuapi.so pkgIndex.tcl

tuapi.so: build-dyn.sh tuapi.c tuapi.tcl stringify.tcl
	@echo "Using tclConfig.sh = $(TCLCONFIGSH)"
	./build-dyn.sh

pkgIndex.tcl: tuapi.so

install: tuapi.so pkgIndex.tcl
	mkdir -p $(DESTDIR)$(PACKAGE_INSTALL_DIR)
	cp tuapi.so pkgIndex.tcl $(DESTDIR)$(PACKAGE_INSTALL_DIR)

clean:
	rm -f tuapi.so pkgIndex.tcl

distclean: clean

mrproper: distclean
	rm -f tuapi.tcl.h

.PHONY: all install clean distclean mrproper

Modified build-common.sh from [9e9c539c66] to [82f16cfdad].

1
2
3
4


5
6
7
8
9
10
11



12
13
14
15
16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


19




+
+







+
+
+


-
-

#! /bin/bash

set -e

tuapi_version="$(grep Tcl_PkgProvide tuapi.c | awk '{ print $3 }' | sed 's@[");]*@@g')"

case "$1" in
	clean|distclean)
		rm -rf out inst
		rm -f libtuapi.a tuapi.o tuapi.so
		rm -f tuapi.tcl.h
		exit 0
		;;
	version)
		echo "${tuapi_version}"
		;;
esac

tuapi_version="$(grep Tcl_PkgProvide tuapi.c | awk '{ print $3 }' | sed 's@[");]*@@g')"

./stringify.tcl tuapi.tcl > tuapi.tcl.h

Modified build-dyn.sh from [8040cbd4a5] to [8f5100d9aa].

1
2
3
4
5
6

7


8
9
10
11
12
13
14
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)"
	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} ${TCL_STUB_LIB_SPEC} -shared -rdynamic -o tuapi.so tuapi.c"
eval ${TCL_CC} -ggdb3 -fPIC -DPIC -Wall -DUSE_TCL_STUBS=1 ${TCL_DEFS} ${TCL_INCLUDE_SPEC} ${TCL_STUB_LIB_SPEC} -shared -rdynamic -o tuapi.so tuapi.c

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