Check-in [f6d387c96c]
Overview
Comment:Added enough critcl to be handle tcllib
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f6d387c96c04d1f35257a486d5c194423e87a9c3
User & Date: rkeene on 2017-10-13 20:34:02.983
Other Links: manifest | tags
Context
2017-10-13
20:36
Disabled a test which now does not work check-in: 30810bb6d9 user: rkeene tags: trunk
20:34
Added enough critcl to be handle tcllib check-in: f6d387c96c user: rkeene tags: trunk
19:59
Fixed typo and added test for process_command_line check-in: 6641266e0b user: rkeene tags: trunk
Changes
56
57
58
59
60
61
62
63

64
65
66
67
68
69

70
71
72
73
74
75
76
56
57
58
59
60
61
62

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77







-
+






+








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

install: $(TARGET) pkgIndex.tcl $(srcdir)/tcc4tcl.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(shell echo $(srcdir)/tcc/win32/lib/*.c) $(srcdir)/headers.awk $(srcdir)/patch-headers.sh
install: $(TARGET) pkgIndex.tcl $(srcdir)/tcc4tcl.tcl $(srcdir)/tcc4critcl.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(shell echo $(srcdir)/tcc/win32/lib/*.c) $(srcdir)/headers.awk $(srcdir)/patch-headers.sh
	$(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)/tcc4tcl.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 $(srcdir)/tcc4critcl.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
	$(INSTALL) -m 0644 tcc/libtcc1.a "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -m 0644 $(shell echo $(srcdir)/tcc/win32/lib/*.c) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
	$(INSTALL) -m 0644 $(shell echo $(srcdir)/tcc/include/*) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
	@if ! echo "_WIN32" | $(CPP) $(CPPFLAGS) - | grep '^_WIN32$$' >/dev/null; then \
		echo cp -r $(srcdir)/tcc/win32/include/* "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include/"; \
		cp -r $(srcdir)/tcc/win32/include/* "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include/"; \
		echo cp -r $(srcdir)/tcc/win32/lib/*.def "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib/"; \
87
88
89
90
91
92
93
94

95
96
97
98
99
100
101
88
89
90
91
92
93
94

95
96
97
98
99
100
101
102







-
+







		done
	$(srcdir)/patch-headers.sh "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"

test: test.tcl
	rm -rf __TMP__
	$(MAKE) install tcllibdir=$(shell pwd)/__TMP__
	-if [ "$(PACKAGE_VERSION)" = '@@VERS@@' ]; then cd __TMP__/* && ( \
		for file in tcc4tcl.tcl pkgIndex.tcl; do \
		for file in tcc4tcl.tcl tcc4critcl.tcl pkgIndex.tcl; do \
			sed 's/@@VERS@@/0.0/g' "$${file}" > "$${file}.new"; \
			cat "$${file}.new" > "$${file}"; \
			rm -f "$${file}.new"; \
		done \
	); fi
	if [ '@build@' = '@host@' ]; then TCC4TCL_TEST_RUN_NATIVE=1; export TCC4TCL_TEST_RUN_NATIVE; fi; $(TCLSH) $(srcdir)/test.tcl __TMP__
	echo Tests Completed OK > TEST-STATUS
1

1
2

+
package ifneeded tcc4tcl @PACKAGE_VERSION@ [list source [file join $dir tcc4tcl.tcl]]
package ifneeded critcl 0 [list source [file join $dir tcc4critcl.tcl]]
Added tcc4critcl.tcl version [f455727caf].
Modified test.tcl from [3226475418] to [63a2456439].
223
224
225
226
227
228
229











230
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241







+
+
+
+
+
+
+
+
+
+
+

	return(TCL_OK);
}
$handle go
if {[testCCommand] ne "OKAY"} {
	error "\[testCCommand\] Invalid result"
}

# Critcl test
package require -exact critcl 0
critcl::ccode {
#define test 1234
}

critcl::cproc test14 {int x} int {
	return(x + test);
}
puts "Test14: [test14 3]"

exit 0