Code Comments
Programming Forum and web based access to our favorite programming groups.I added these lines to my configure.ac file:
AC_SUBST([PACKAGE_PATCHLEVEL], [1.0.1])
AC_DEFINE_UNQUOTED(PACKAGE_PATCHLEVEL, "$PACKAGE_PATCHLEVEL")
This passes -DPACKAGE_PATCHLEVEL=\"1.0.1\" to the compiler.
My question is, should I call Tcl_PkgProvide("1.0.1") or just
Tcl_PkgProvide("1.0")?
Tcl and Tk pass 8.4 not 8.4.9, while the Tile extension passes 0.6.3 not
0.6.
Also, should my pkgIndex.tcl file call "package provide MyPkg 1.0.1" or
"package provide MyPkg 1.0"? It seems the Tile Windows pkgIndex.tcl file
uses 0.6 while the Tile Unix pkgIndex.tcl file uses 0.6.3.
-- Tim Baker
Post Follow-up to this messageTim Baker wrote:
> I added these lines to my configure.ac file:
>
> AC_SUBST([PACKAGE_PATCHLEVEL], [1.0.1])
> AC_DEFINE_UNQUOTED(PACKAGE_PATCHLEVEL, "$PACKAGE_PATCHLEVEL")
>
> This passes -DPACKAGE_PATCHLEVEL=\"1.0.1\" to the compiler.
>
> My question is, should I call Tcl_PkgProvide("1.0.1") or just
> Tcl_PkgProvide("1.0")?
You should Tcl_PkgProvide("1.0.1") ...
>
> Also, should my pkgIndex.tcl file call "package provide MyPkg 1.0.1" or
> "package provide MyPkg 1.0"?
The index script (pkgIndex.tcl file) should not [package provide]
anything at all. It should use [package ifneeded] to trigger a
[load] of the appropriate shared library. During the [load] the
Tcl_PkgProvide() call discussed above will take care of any
[package provide]-ing.
The [package ifneeded] command in your index script should get
the full version number, 1.0.1, as an argument.
--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|_______________________________________
_______________________________|
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.