Check-in [0e7070d332]
Overview
Comment:Updated to produce working pkgIndex.tcl file
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0e7070d332e6d00342db3f148ba3dfd82aab027c
User & Date: rkeene on 2014-05-02 01:36:22.154
Other Links: manifest | tags
Context
2014-05-02
01:50
Updated to be more simple about loading objects check-in: 5b517f12c1 user: rkeene tags: trunk
01:36
Updated to produce working pkgIndex.tcl file check-in: 0e7070d332 user: rkeene tags: trunk
01:19
Added release engineering data check-in: 5f641e41fb user: rkeene tags: trunk
Changes
1
2
3
4
5
6
7
8
9
10
11
12

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












+

aclocal.m4
aclocal/shobj.m4
aclocal/tcl.m4
aclocal/versionscript.m4
config.guess
config.sub
config.log
config.status
configure
install-sh
Makefile
pkgIndex.tcl
pkgIndex.tcl.tmpl
tcc/*
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
56

57
58
59
60
61
62
63
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


56
57
58
59
60
61
62

63
64
65
66
67
68
69
70







+
+
+




-
-
+
+







+
+
+
-
+

+

-
+



-
-
+
+





-
+







	else \
		mkdir tcc >/dev/null 2>/dev/null; \
		cd tcc && $(shell cd $(srcdir) && pwd)/tcc/configure; \
	fi

tcc/libtcc.a: tcc/config.h
	$(MAKE) -C tcc libtcc.a

tcc/libtcc1.a: tcc/config.h
	$(MAKE) -C tcc libtcc1.a

tcltcc.o: $(srcdir)/tcltcc.c $(srcdir)/tcc/tcc.h $(srcdir)/tcc/libtcc.h tcc/config.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -o tcltcc.o -c $(srcdir)/tcltcc.c

tcltcc-shared.@SHOBJEXT@: tcltcc.o tcc/libtcc.a
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tcltcc-shared.@SHOBJEXT@ tcltcc.o $(LIBS)
tcltcc.@SHOBJEXT@: tcltcc.o tcc/libtcc.a
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tcltcc.@SHOBJEXT@ tcltcc.o $(LIBS)

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

pkgIndex.tcl: pkgIndex.tcl.tmpl
	if [ "${TARGETS}" = 'tcltcc-static.a' ]; then awk '/^STATIC:/{ $$1 = ""; print }'; else awk '/^SHARED:/{ $$1 = ""; print }'; fi < pkgIndex.tcl.tmpl | sed 's@^ @@' > pkgIndex.tcl

install: $(TARGETS) pkgIndex.tcl
install: $(TARGETS) pkgIndex.tcl tcc/libtcc1.a
	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0755 $(TARGETS) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0755 $(TARGETS) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 tcc/libtcc1.a "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"

clean:
	rm -f tcltcc.o
	rm -f tcltcc-shared.@SHOBJEXT@ tcltcc-static.a
	rm -f tcltcc-shared.@SHOBJEXT@.a tcltcc-shared.@SHOBJEXT@.def
	rm -f tcltcc.@SHOBJEXT@ tcltcc-static.a
	rm -f tcltcc.@SHOBJEXT@.a tcltcc.@SHOBJEXT@.def
	-$(MAKE) -C tcc clean

distclean: clean
	rm -rf autom4te.cache
	rm -f config.log config.status
	rm -f pkgIndex.tcl
	rm -f pkgIndex.tcl pkgIndex.tcl.tmpl
	rm -f Makefile
	-$(MAKE) -C tcc distclean

mrproper: distclean
	rm -rf __TMP__
	rm -rf tcc
	rm -f configure aclocal.m4
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

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







-
+


















-
+
	target=shared
])

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

	TARGETS="tcltcc-shared.${SHOBJEXT}"
	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)

dnl Look for appropriate headers
AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h dlfcn.h dl.h)

dnl Perform Tcl Extension required stuff
TCLEXT_INIT

dnl Produce output
AC_OUTPUT(Makefile pkgIndex.tcl)
AC_OUTPUT(Makefile pkgIndex.tcl.tmpl)


1
2
+
+
STATIC: package ifneeded tcc4tcl @PACKAGE_VERSION@ [list source [file join $dir tcc.tcl]]
SHARED: package ifneeded tcc4tcl @PACKAGE_VERSION@ [list load [file join $dir tcc4tcl.@SHOBJEXT@]]\;\ [list source [file join $dir tcc.tcl]]