Check-in [770ae24263]
Overview
Comment:Allow projects to override init functions and package names
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 770ae242632c8563caeb0d9ad75c8e79aec6cb86
User & Date: rkeene on 2018-06-10 06:15:22
Other Links: manifest | tags
Context
2018-06-10
06:15
Specify Tcl package name and init function, if specified check-in: 008f3ba007 user: rkeene tags: trunk
06:15
Allow projects to override init functions and package names check-in: 770ae24263 user: rkeene tags: trunk
06:14
Updated ignores for LMDB check-in: 41bafb40be user: rkeene tags: trunk
Changes

Modified kitsh/buildsrc/kitsh-0.0/aclocal.m4 from [44cc3a905e] to [859b63dc85].

302
303
304
305
306
307
308



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325



326
327
328
329
330
331
332
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338







+
+
+

















+
+
+








		if test -n "${subprojs}"; then
			if test -n "${projlibfilesnostub}"; then
				for subproj in $subprojs; do
					subprojucase="`echo ${subproj} | dd conv=ucase 2>/dev/null`"
					subprojtcase="`echo ${subprojucase} | cut -c 1``echo ${subproj} | cut -c 2-`"
					lib_init_func="${subprojtcase}_Init"
					if test -f "${projdir}/inst/tcl-init-func"; then
						lib_init_func="`cat "${projdir}/inst/tcl-init-func"`"
					fi

					echo "#define KIT_INCLUDES_${subprojucase}" >> kitInit-libs.h
					echo "Tcl_AppInitProc ${lib_init_func};" >> kitInit-libs.h

					libs_init_funcs="${libs_init_funcs} ${lib_init_func}"
				done
			fi
		fi

		ARCHS="${ARCHS} ${projlibfiles}"
		LIBS="${LIBS} ${projlibextra}"
	done

	echo '' >> kitInit-libs.h
	echo 'static void _Tclkit_GenericLib_Init(void) {' >> kitInit-libs.h
	for lib_init_func in ${libs_init_funcs}; do
		proj="`echo ${lib_init_func} | sed 's@_Init$$@@@' | dd conv=lcase 2>/dev/null`"
		if test -f "${projdir}/inst/tcl-pkg-name"; then
			proj="`cat "${projdir}/inst/tcl-pkg-name"`"
		fi
		echo "	Tcl_StaticPackage(0, \"${proj}\", ${lib_init_func}, NULL);" >> kitInit-libs.h
	done
	echo '	return;' >> kitInit-libs.h
	echo '}' >> kitInit-libs.h

	AC_SUBST(ARCHS)
	AC_SUBST(STRIPLIBS)