Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-11-08
11:08 • Closed ticket [219259ffff]: Makefile targets using TCL_EXE require ".&a... artifact: 2bd485d230 user: mdejong
2001-09-19
05:08 • Ticket [219259ffff]: 4 changes artifact: 9cf263fb85 user: dgp
00:03 • Ticket [219259ffff]: 4 changes artifact: 977d9999df user: mdejong
2001-09-08
06:41 • Ticket [219259ffff]: 1 change artifact: 96ddbbb8b8 user: andreas_kupries
2001-04-05
06:52 • Ticket [219259ffff]: 2 changes artifact: 7e452e588a user: dgp
2000-11-15
21:37 • Ticket [219259ffff]: 1 change artifact: 4bc85036df user: dkf
2000-10-26
05:04 • New ticket [219259ffff]. artifact: 86e7dd3933 user: nobody

Makefile targets using TCL_EXE require "." in path

Closed / Fixed219259ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2000-10-26 05:04:16
OriginalBugID: 6158 Bug
Version: 8.3.2
SubmitDate: '2000-08-23'
LastModified: '2000-08-29'
Severity: MED
Status: Assigned
Submitter: techsupp
ChangedBy: ericm
OS: HP-UX
OSVersion: 10.20
Machine: HP C360
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
Bob Techentin

Comments:
This patch appears to work for making the genstubs target for both tcl
    and tk on hp/ux 10.20, but I also see that TCL_EXE is used for Mac
    targets, which I have no way to test.

ReproducibleScript:
Configure and make Tcl where there is no "tclsh" in the path and where "." 
is not in the path, and make will fail.  Several targets depend upon 
TCL_EXE which is defined as "tclsh", but it should probably be "./tclsh"
in the case of Tcl, and "$(TCL_BIN_DIR)/tclsh" in the case of Tk.

ObservedBehavior:
During make genstubs (and others), you get the error message:

  tclsh ./../tools/genStubs/tcl ./../generic  ./../generic/tcl.decls ./../generic/tclInt.dcls
  sh: tclsh: not found.
  *** Error exit code 127

Patch:
*** tcl8.3.2/unix/Makefile.in.orig      Tue Aug  8 14:17:11 2000
--- tcl8.3.2/unix/Makefile.in   Wed Aug 23 09:16:49 2000
***************
*** 170,176 ****
  # once we have created the initial executable, but in some cases you
  # may want to use a target without having made tclsh on these sources
  # (like for make genstubs)
! TCL_EXE                       = tclsh

  # The symbols below provide support for dynamic loading and shared
  # libraries.  See configure.in for a description of what the
--- 170,176 ----
  # once we have created the initial executable, but in some cases you
  # may want to use a target without having made tclsh on these sources
  # (like for make genstubs)
! TCL_EXE                       = ./tclsh

  # The symbols below provide support for dynamic loading and shared
  # libraries.  See configure.in for a description of what the

*** tk8.3.2/unix/Makefile.in.orig       Tue Aug  8 14:19:31 2000
--- tk8.3.2/unix/Makefile.in    Wed Aug 23 09:36:58 2000
***************
*** 163,169 ****
  # once we have created the initial executable, but in some cases you
  # may want to use a target without having made tclsh on these sources
  # (like for make genstubs)
! TCL_EXE                       = tclsh

  # The symbols below provide support for dynamic loading and shared
  # libraries.  The values of the symbols are normally set by the
--- 163,169 ----
  # once we have created the initial executable, but in some cases you
  # may want to use a target without having made tclsh on these sources
  # (like for make genstubs)
! TCL_EXE                       = $(TCL_BIN_DIR)/tclsh

  # The symbols below provide support for dynamic loading and shared
  # libraries.  The values of the symbols are normally set by the

PatchFiles:
tcl8.3.2/unix/Makefile.in
    tk8.3.2/unix/Makefile.in



Verified:  if tclsh is not in the path, then 'make genstubs' will fail as described.  However, it may not be correct to simply replace 
'TCL_EXE = tclsh' with 'TCL_EXE = ./tclsh'.  As the comment in the Makefile states:

# The following specifies which Tcl executable to use for make targets
# below.  This can generally be 'tclsh', meaning all targets will work
# once we have created the initial executable, but in some cases you
# may want to use a target without having made tclsh on these sources
# (like for make genstubs)

If the suggested change is made (replace tclsh with ./tclsh), then 'make genstubs' will *require* that tclsh has been built.  It would be better if we could set up a fallback such that first 'tclsh' was used, then './tclsh' if 'tclsh' couldn't be found.

   Eric Melski                            The Other Tcl Guy
   ericm at ajubasolutions.com            Ajuba Solutions

-- 08/29/2000 ericm
dkf Ticket [219259ffff]: 1 change [History diff]2000-11-15 21:37:44
dgp Ticket [219259ffff]: 2 changes [History diff]2001-04-05 06:52:45
andreas_kupries Ticket [219259ffff]: 1 change [History diff]2001-09-08 06:41:39
mdejongplain2001-09-19 00:03:38
Logged In: YES 
user_id=90858

I think the right solution here is to remove
TCL_EXE or just remove the deps that require
Tcl to build Tcl. We could still look for tclsh
on the path in case it is there. We just can't
require it. Targets like genstubs can be run by
hand but they should never be run automatically.
dgpplain2001-09-19 05:08:04
Logged In: YES 
user_id=80530

I think 'make genstubs' and 'make mklinks' should
definitely be dependencies of 'make dist'.

You may be right that a simple 'make' or 'make all'
shouldn't be invoking 'make genstubs' because of the
risk of trapping the end user in a chicken or egg problem,
but we should use the dependency discipline of make to
help us produce self-consistent distributions.
mdejongplain2001-11-08 11:08:16
Logged In: YES 
user_id=90858

The problem where folks could not build because tclsh
could not be found was fixed by 465874 committed on
2001-11-07. I don't think adding a dep to "make dist"
is the right approach. Instead a "./configure
--enable-maintainer-mode" command coule enable extra
checks so that they would be done automatically. I will
leave that issue for another bug report.
Log in (anonymous is fine) to add a comment.