Check-in [d2385ff774]
Overview
Comment:Minor cleanup
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d2385ff77474078c584d870aa71b8f43b0583a5e
User & Date: rkeene on 2014-05-02 05:39:02
Other Links: manifest | tags
Context
2014-05-02
06:29
Added more cross-compiling support check-in: ea645d2a50 user: rkeene tags: trunk
05:39
Minor cleanup check-in: d2385ff774 user: rkeene tags: trunk
05:34
Updated to install required basic headers check-in: 0a6b909b1f user: rkeene tags: trunk
Changes

Modified Makefile.in from [85aaa6526a] to [dfbe0b3ccd].

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
prefix = UNSPECIFIED
exec_prefix = @exec_prefix@
libdir = @libdir@

TARGETS = @TARGETS@

CC = @CC@
AR = @AR@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ @SHOBJFLAGS@
CPPFLAGS = @CPPFLAGS@ -I@srcdir@ -I@srcdir@/tcc -Itcc @DEFS@
LDFLAGS =
SHOBJLDFLAGS = @SHOBJLDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@

PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@

TCLCONFIGPATH = @TCLCONFIGPATH@
TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
tcllibdir = $(shell if echo "$(libdir)" | grep '^UNSPECIFIED' >/dev/null; then echo $(TCL_PACKAGE_PATH); else echo "$(libdir)"; fi)
PACKAGE_INSTALL_DIR = $(tcllibdir)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
TCC_CONFIGURE_OPTS = --extra-cflags='$(CPPFLAGS) $(CFLAGS)' --with-tcl=$(TCLCONFIGPATH) --sysincludepaths='{B}/include' --libpaths='{B}/lib'
srcdir = @srcdir@

all: $(TARGETS)

tcc/config.h:
	if [ "$(srcdir)" = "." ]; then \
		cd tcc && ./configure $(TCC_CONFIGURE_OPTS); \
	else \
		mkdir tcc >/dev/null 2>/dev/null; \
		cd tcc && $(shell cd $(srcdir) && pwd)/tcc/configure $(TCC_CONFIGURE_OPTS); \




|


















|


|







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
prefix = UNSPECIFIED
exec_prefix = @exec_prefix@
libdir = @libdir@

TARGET = @TARGET@

CC = @CC@
AR = @AR@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ @SHOBJFLAGS@
CPPFLAGS = @CPPFLAGS@ -I@srcdir@ -I@srcdir@/tcc -Itcc @DEFS@
LDFLAGS =
SHOBJLDFLAGS = @SHOBJLDFLAGS@
LIBS = @LIBS@
INSTALL = @INSTALL@

PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@

TCLCONFIGPATH = @TCLCONFIGPATH@
TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
tcllibdir = $(shell if echo "$(libdir)" | grep '^UNSPECIFIED' >/dev/null; then echo $(TCL_PACKAGE_PATH); else echo "$(libdir)"; fi)
PACKAGE_INSTALL_DIR = $(tcllibdir)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
TCC_CONFIGURE_OPTS = --extra-cflags='$(CPPFLAGS) $(CFLAGS)' --with-tcl=$(TCLCONFIGPATH) --sysincludepaths='{B}/include' --libpaths='{B}/lib' @TCC_CONFIGURE_OPTS@
srcdir = @srcdir@

all: $(TARGET)

tcc/config.h:
	if [ "$(srcdir)" = "." ]; then \
		cd tcc && ./configure $(TCC_CONFIGURE_OPTS); \
	else \
		mkdir tcc >/dev/null 2>/dev/null; \
		cd tcc && $(shell cd $(srcdir) && pwd)/tcc/configure $(TCC_CONFIGURE_OPTS); \
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

tcltcc-static.a: tcltcc.o tcc/libtcc.a
	cp tcc/libtcc.a tcltcc-static.new.a
	$(AR) rcu tcltcc-static.new.a tcltcc.o
	-$(RANLIB) tcltcc-static.new.a
	mv tcltcc-static.new.a tcltcc-static.a

install: $(TARGETS) pkgIndex.tcl $(srcdir)/tcc.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(srcdir)/headers.awk
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	$(INSTALL) -m 0755 $(TARGETS) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 $(srcdir)/tcc.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 tcc/libtcc1.a "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -m 0644 $(shell echo $(srcdir)/tcc/include/*) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	( for file in tcl.h limits.h unistd.h; do echo "#include <$${file}>"; done ) | \
		$(CC) $(CPPFLAGS) $(CFLAGS) -I$(srcdir)/tcc/include -I$(srcdir)/tcc/include -E - | awk -f $(srcdir)/headers.awk | while read src dst; do \
			dst="$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include/$$dst"; \







|



|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

tcltcc-static.a: tcltcc.o tcc/libtcc.a
	cp tcc/libtcc.a tcltcc-static.new.a
	$(AR) rcu tcltcc-static.new.a tcltcc.o
	-$(RANLIB) tcltcc-static.new.a
	mv tcltcc-static.new.a tcltcc-static.a

install: $(TARGET) pkgIndex.tcl $(srcdir)/tcc.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(srcdir)/headers.awk
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	$(INSTALL) -m 0755 $(TARGET) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 $(srcdir)/tcc.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 tcc/libtcc1.a "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -m 0644 $(shell echo $(srcdir)/tcc/include/*) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	( for file in tcl.h limits.h unistd.h; do echo "#include <$${file}>"; done ) | \
		$(CC) $(CPPFLAGS) $(CFLAGS) -I$(srcdir)/tcc/include -I$(srcdir)/tcc/include -E - | awk -f $(srcdir)/headers.awk | while read src dst; do \
			dst="$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include/$$dst"; \

Modified configure.ac from [d1da927dd5] to [cc0f388ad8].

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

dnl Determine system information
DC_CHK_OS_INFO

dnl Determine if a shared or static build is requested
AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [build static library instead of shared library]), [
	if test "$enableval" = "no"; then
		target=static
	else
		target=shared
	fi
], [
	target=shared
])


if test "${target}" = "shared"; then
	dnl Determine how to make shared objects
	DC_GET_SHOBJFLAGS

	dnl Only export symbols we wish to expose
	DC_SETVERSIONSCRIPT([tcltcc.syms], [tcltcc.vers])
	DC_FIND_STRIP_AND_REMOVESYMS([tcltcc.syms])

	TARGETS="tcltcc.${SHOBJEXT}"
else
	TARGETS="tcltcc-static.a"
fi
AC_SUBST(TARGETS)



dnl Find out if we have the functions needed to open shared objects
AC_SEARCH_LIBS(dlopen, dl,, [
        AC_SEARCH_LIBS(shl_load, dld dl)
])
AC_CHECK_FUNCS(dlopen shl_load)








|

|


|


>
|







|

|

|
>
>







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

dnl Determine system information
DC_CHK_OS_INFO

dnl Determine if a shared or static build is requested
AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [build static library instead of shared library]), [
	if test "$enableval" = "no"; then
		TCC4TCL_TARGET=static
	else
		TCC4TCL_TARGET=shared
	fi
], [
	TCC4TCL_TARGET=shared
])

TCC_CONFIGURE_OPTS=""
if test "${TCC4TCL_TARGET}" = "shared"; then
	dnl Determine how to make shared objects
	DC_GET_SHOBJFLAGS

	dnl Only export symbols we wish to expose
	DC_SETVERSIONSCRIPT([tcltcc.syms], [tcltcc.vers])
	DC_FIND_STRIP_AND_REMOVESYMS([tcltcc.syms])

	TARGET="tcltcc.${SHOBJEXT}"
else
	TARGET="tcltcc-static.a"
fi
AC_SUBST(TARGET)
AC_SUBST(TCC4TCL_TARGET)
AC_SUBST(TCC_CONFIGURE_OPTS)

dnl Find out if we have the functions needed to open shared objects
AC_SEARCH_LIBS(dlopen, dl,, [
        AC_SEARCH_LIBS(shl_load, dld dl)
])
AC_CHECK_FUNCS(dlopen shl_load)