tdbc::mysql

Check-in [d65774b5d5]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use INSTALL_* and new DIST_INSTALL_* macros to make dist. Align with latest TEA.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d65774b5d542daa74efecb91abe89404903532141a1effc67ed31d011f3cebc3
User & Date: stu 2018-01-04 05:40:58
Context
2018-01-05
06:50
Merge stu-pkgIndex. Companion to https://core.tcl.tk/tdbc/info/2386d26cfb8a34c3. check-in: e1cffb24c6 user: stu tags: trunk
06:49
Merge trunk. Closed-Leaf check-in: 730fd5422e user: stu tags: stu-pkgIndex
2018-01-04
05:40
Use INSTALL_* and new DIST_INSTALL_* macros to make dist. Align with latest TEA. check-in: d65774b5d5 user: stu tags: trunk
2017-12-22
13:35
Convert all win/*.vc files to crlf line-endings check-in: a654caeed7 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.in.

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
...
294
295
296
297
298
299
300



301
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
339
340
341
342
343
344
345
346
347
348
349
350
351
pkgdatadir	= $(datadir)/$(PKG_DIR)
pkglibdir	= $(libdir)/$(PKG_DIR)
pkgincludedir	= $(includedir)/$(PKG_DIR)

top_builddir	= .

INSTALL_OPTIONS	=
INSTALL		= @[email protected] ${INSTALL_OPTIONS}
INSTALL_DATA_DIR = @[email protected]
INSTALL_DATA	= @[email protected]
INSTALL_PROGRAM	= @[email protected]
INSTALL_SCRIPT	= @[email protected]
INSTALL_LIBRARY	= @[email protected]

PACKAGE_NAME	= @[email protected]
................................................................................
	    $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
	done

test: binaries libraries
	@$(TCLSH) `@[email protected] $(srcdir)/tests/all.tcl` $(TESTFLAGS) \
		-load "package ifneeded tdbc::mysql $(PACKAGE_VERSION) \
			[list source `@[email protected] $(srcdir)/library/tdbcmysql.tcl`]\;[list load `@[email protected] $(PKG_LIB_FILE)` $(PACKAGE_NAME)];\
		package ifneeded tdbc ${TDBC_VERSION} \
			[list source `@[email protected] $(TDBC_BIN_DIR)/tdbc.tcl`]\;[list load `@[email protected] $(TDBC_BIN_DIR)/$(TDBC_LIB_FILE)` tdbc]"

shell: binaries libraries
	@$(TCLSH) $(SCRIPT)

gdb:
	$(TCLSH_ENV) $(PKG_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
................................................................................
#========================================================================

#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
COMPRESS	= tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
DIST_ROOT	= /tmp/dist
DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)




dist-clean:
	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*

dist: dist-clean
	$(INSTALL_DATA_DIR) $(DIST_DIR)

	cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \

		$(srcdir)/configure.ac $(DIST_DIR)/
	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.ac

	for i in $(srcdir)/*.[ch]; do \
	    if [ -f $$i ]; then \
		cp -p $$i $(DIST_DIR)/ ; \
	    fi; \
	done;

	$(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig

	cp -p $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
		$(DIST_DIR)/tclconfig/
	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
	chmod +x $(DIST_DIR)/tclconfig/install-sh

	mkdir $(DIST_DIR)/doc
	cp -p $(srcdir)/doc/tdbc_mysql.n $(DIST_DIR)/doc/

	mkdir $(DIST_DIR)/generic

	cp -p $(srcdir)/generic/fakemysql.h \
		$(srcdir)/generic/mysqlStubDefs.txt \
		$(srcdir)/generic/mysqlStubInit.c \
		$(srcdir)/generic/mysqlStubs.h \
		$(srcdir)/generic/tdbcmysql.c \
		$(srcdir)/generic/int2ptr_ptr2int.h \
		$(DIST_DIR)/generic/

	mkdir $(DIST_DIR)/library
	cp -p $(srcdir)/library/tdbcmysql.tcl $(DIST_DIR)/library/

	mkdir $(DIST_DIR)/tests
	cp -p $(srcdir)/tests/all.tcl $(srcdir)/tests/tdbcmysql.test \
		$(DIST_DIR)/tests/

	mkdir $(DIST_DIR)/win
	cp -p $(srcdir)/win/makefile.vc $(srcdir)/win/nmakehlp.c \
		$(srcdir)/win/targets.vc $(srcdir)/win/rules-ext.vc \
		$(srcdir)/win/rules.vc $(DIST_DIR)/win/

	(cd $(DIST_ROOT); $(COMPRESS);)

#========================================================================
# How to rebuild the package's stub table.






|







 







|







 







>
>
>





>
|
|
>
|
<
|



|




>
|

<
<

|
|

|
>
|







|
|

|
|


|
|







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
...
294
295
296
297
298
299
300
301
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
pkgdatadir	= $(datadir)/$(PKG_DIR)
pkglibdir	= $(libdir)/$(PKG_DIR)
pkgincludedir	= $(includedir)/$(PKG_DIR)

top_builddir	= .

INSTALL_OPTIONS	=
INSTALL		= @[email protected] $(INSTALL_OPTIONS)
INSTALL_DATA_DIR = @[email protected]
INSTALL_DATA	= @[email protected]
INSTALL_PROGRAM	= @[email protected]
INSTALL_SCRIPT	= @[email protected]
INSTALL_LIBRARY	= @[email protected]

PACKAGE_NAME	= @[email protected]
................................................................................
	    $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
	done

test: binaries libraries
	@$(TCLSH) `@[email protected] $(srcdir)/tests/all.tcl` $(TESTFLAGS) \
		-load "package ifneeded tdbc::mysql $(PACKAGE_VERSION) \
			[list source `@[email protected] $(srcdir)/library/tdbcmysql.tcl`]\;[list load `@[email protected] $(PKG_LIB_FILE)` $(PACKAGE_NAME)];\
		package ifneeded tdbc $(TDBC_VERSION) \
			[list source `@[email protected] $(TDBC_BIN_DIR)/tdbc.tcl`]\;[list load `@[email protected] $(TDBC_BIN_DIR)/$(TDBC_LIB_FILE)` tdbc]"

shell: binaries libraries
	@$(TCLSH) $(SCRIPT)

gdb:
	$(TCLSH_ENV) $(PKG_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
................................................................................
#========================================================================

#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
COMPRESS	= tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
DIST_ROOT	= /tmp/dist
DIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)

DIST_INSTALL_DATA	= CPPROG='cp -p' $(INSTALL) -m 644
DIST_INSTALL_SCRIPT	= CPPROG='cp -p' $(INSTALL) -m 755

dist-clean:
	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*

dist: dist-clean
	$(INSTALL_DATA_DIR) $(DIST_DIR)
	$(DIST_INSTALL_DATA) $(srcdir)/license.terms \
		$(srcdir)/ChangeLog $(srcdir)/README \
		$(srcdir)/aclocal.m4 $(srcdir)/configure.ac \
		$(srcdir)/Makefile.in $(srcdir)/pkgIndex.tcl.in \
		$(DIST_DIR)/

	$(DIST_INSTALL_SCRIPT) $(srcdir)/configure $(DIST_DIR)/

	for i in $(srcdir)/*.[ch]; do \
	    if [ -f $$i ]; then \
		$(DIST_INSTALL_DATA) $$i $(DIST_DIR)/ ; \
	    fi; \
	done;

	$(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig
	$(DIST_INSTALL_DATA) $(srcdir)/tclconfig/README.txt \
		$(srcdir)/tclconfig/tcl.m4 $(srcdir)/tclconfig/install-sh \
		$(DIST_DIR)/tclconfig/



	$(INSTALL_DATA_DIR) $(DIST_DIR)/doc
	$(DIST_INSTALL_DATA) $(srcdir)/doc/tdbc_mysql.n $(DIST_DIR)/doc/

	$(INSTALL_DATA_DIR) $(DIST_DIR)/generic
	$(DIST_INSTALL_DATA) \
		$(srcdir)/generic/fakemysql.h \
		$(srcdir)/generic/mysqlStubDefs.txt \
		$(srcdir)/generic/mysqlStubInit.c \
		$(srcdir)/generic/mysqlStubs.h \
		$(srcdir)/generic/tdbcmysql.c \
		$(srcdir)/generic/int2ptr_ptr2int.h \
		$(DIST_DIR)/generic/

	$(INSTALL_DATA_DIR) $(DIST_DIR)/library
	$(DIST_INSTALL_DATA) $(srcdir)/library/tdbcmysql.tcl $(DIST_DIR)/library/

	$(INSTALL_DATA_DIR) $(DIST_DIR)/tests
	$(DIST_INSTALL_DATA) $(srcdir)/tests/all.tcl $(srcdir)/tests/tdbcmysql.test \
		$(DIST_DIR)/tests/

	$(INSTALL_DATA_DIR) $(DIST_DIR)/win
	$(DIST_INSTALL_DATA) $(srcdir)/win/makefile.vc $(srcdir)/win/nmakehlp.c \
		$(srcdir)/win/targets.vc $(srcdir)/win/rules-ext.vc \
		$(srcdir)/win/rules.vc $(DIST_DIR)/win/

	(cd $(DIST_ROOT); $(COMPRESS);)

#========================================================================
# How to rebuild the package's stub table.

Changes to configure.

2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
....
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------


    # TEA extensions pass this us the version of TEA they think they
    # are compatible with.
    TEA_VERSION="3.10"

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
$as_echo_n "checking for correct TEA configuration... " >&6; }
    if test x"${PACKAGE_NAME}" = x ; then
	as_fn_error $? "
The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
    fi
    if test x"3.10" = x ; then
	as_fn_error $? "
TEA version not specified." "$LINENO" 5
    elif test "3.10" != "${TEA_VERSION}" ; then
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&5
$as_echo "warning: requested TEA version \"3.10\", have \"${TEA_VERSION}\"" >&6; }
    else
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
    fi

    # If the user did not set CFLAGS, set it now to keep macros
    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
    if test "${CFLAGS+set}" != "set" ; then
	CFLAGS=""
    fi

................................................................................
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_LIBRARY='${INSTALL_DATA}'













<
<
|

|
|




<
<
<
<
<
<
<
|

<







 







|
|
|







2426
2427
2428
2429
2430
2431
2432


2433
2434
2435
2436
2437
2438
2439
2440







2441
2442

2443
2444
2445
2446
2447
2448
2449
....
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------




    TEA_VERSION="3.12"

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5
$as_echo_n "checking TEA configuration... " >&6; }
    if test x"${PACKAGE_NAME}" = x ; then
	as_fn_error $? "
The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
    fi







    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
$as_echo "ok (TEA ${TEA_VERSION})" >&6; }


    # If the user did not set CFLAGS, set it now to keep macros
    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
    if test "${CFLAGS+set}" != "set" ; then
	CFLAGS=""
    fi

................................................................................
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL} -m 755'
    INSTALL_SCRIPT='${INSTALL} -m 755'
    INSTALL_LIBRARY='${INSTALL} -m 644'







Changes to configure.ac.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------

TEA_INIT([3.10])

AC_CONFIG_AUX_DIR(tclconfig)

#--------------------------------------------------------------------
# Load the tclConfig.sh file
#--------------------------------------------------------------------







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------

TEA_INIT()

AC_CONFIG_AUX_DIR(tclconfig)

#--------------------------------------------------------------------
# Load the tclConfig.sh file
#--------------------------------------------------------------------