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  +TUAPI_VERSION = $(shell ./build-common.sh version)
            2  +TCLCONFIGSH = $(shell find /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /lib /lib64 -name tclConfig.sh -print -quit)
            3  +TCL_PACKAGE_PATH = $(shell . "$(TCLCONFIGSH)"; echo "$${TCL_PACKAGE_PATH}" | tr ' ' $$'\n' | grep -v '^ *$$' | head -n 1)
            4  +PACKAGE_INSTALL_DIR = $(TCL_PACKAGE_PATH)/tuapi-$(TUAPI_VERSION)
            5  +
            6  +export TCLCONFIGSH
            7  +
            8  +all: tuapi.so pkgIndex.tcl
            9  +
           10  +tuapi.so: build-dyn.sh tuapi.c tuapi.tcl stringify.tcl
           11  +	@echo "Using tclConfig.sh = $(TCLCONFIGSH)"
           12  +	./build-dyn.sh
           13  +
           14  +pkgIndex.tcl: tuapi.so
           15  +
           16  +install: tuapi.so pkgIndex.tcl
           17  +	mkdir -p $(DESTDIR)$(PACKAGE_INSTALL_DIR)
           18  +	cp tuapi.so pkgIndex.tcl $(DESTDIR)$(PACKAGE_INSTALL_DIR)
           19  +
           20  +clean:
           21  +	rm -f tuapi.so pkgIndex.tcl
           22  +
           23  +distclean: clean
           24  +
           25  +mrproper: distclean
           26  +	rm -f tuapi.tcl.h
           27  +
           28  +.PHONY: all install clean distclean mrproper

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

     1      1   #! /bin/bash
     2      2   
     3      3   set -e
     4      4   
            5  +tuapi_version="$(grep Tcl_PkgProvide tuapi.c | awk '{ print $3 }' | sed 's@[");]*@@g')"
            6  +
     5      7   case "$1" in
     6      8   	clean|distclean)
     7      9   		rm -rf out inst
     8     10   		rm -f libtuapi.a tuapi.o tuapi.so
     9     11   		rm -f tuapi.tcl.h
    10     12   		exit 0
    11     13   		;;
           14  +	version)
           15  +		echo "${tuapi_version}"
           16  +		;;
    12     17   esac
    13     18   
    14         -tuapi_version="$(grep Tcl_PkgProvide tuapi.c | awk '{ print $3 }' | sed 's@[");]*@@g')"
    15         -
    16     19   ./stringify.tcl tuapi.tcl > tuapi.tcl.h

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

     1      1   # /bin/bash
     2      2   
     3      3   # Perform common build options
     4      4   . build-common.sh
     5      5   
     6      6   # Compile using the same options as Tcl
     7         -TCLCONFIGSH="$(find /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /lib /lib64 -name tclConfig.sh -print -quit)"
            7  +if [ -z "${TCLCONFIGSH}" ]; then
            8  +	TCLCONFIGSH="$(find /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 /lib /lib64 -name tclConfig.sh -print -quit)"
            9  +fi
     8     10   
     9     11   . "${TCLCONFIGSH}"
    10     12   
    11     13   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"
    12     14   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
    13     15   
    14     16   echo 'package ifneeded tuapi '"${tuapi_version}"' [list load [file join $dir tuapi.so]]' > pkgIndex.tcl