This patch simplifies the #! magic used to invoke Tcl scripts by using "/usr/bin/env tclsh" to find the tclsh executable. Very old Cygwin installations providing only tclsh83.exe or cygtclsh80.exe are no-longer supported. Checked-in.
John Dallaway
Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/ChangeLog,v retrieving revision 1.201 diff -u -5 -r1.201 ChangeLog --- ChangeLog 8 Dec 2008 20:15:54 -0000 1.201 +++ ChangeLog 8 Jan 2009 16:53:36 -0000 @@ -1,5 +1,10 @@ +2009-01-08 John Dallaway <[email protected]> + + * ecosadmin.tcl, pkgconf/fixhtml.tcl: Specify script interpreter via + /usr/bin/env. + 2008-12-02 Sergei Gavrikov <[email protected]> * ecos.db: Use the flash V2 driver for the LPC-H2294, LPC-E2294, & LPC-L2294-1MB targets. Index: ecosadmin.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/ecosadmin.tcl,v retrieving revision 1.16 diff -u -5 -r1.16 ecosadmin.tcl --- ecosadmin.tcl 10 Nov 2008 12:30:32 -0000 1.16 +++ ecosadmin.tcl 8 Jan 2009 16:53:38 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "ecosadmin.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh # {{{ Banner #=============================================================================== # Index: pkgconf/fixhtml.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/pkgconf/fixhtml.tcl,v retrieving revision 1.11 diff -u -5 -r1.11 fixhtml.tcl --- pkgconf/fixhtml.tcl 29 Jan 2003 12:45:02 -0000 1.11 +++ pkgconf/fixhtml.tcl 8 Jan 2009 16:53:38 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "fixhtml.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # fixhtml.tcl # Index: devs/framebuf/synth/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/framebuf/synth/current/ChangeLog,v retrieving revision 1.2 diff -u -5 -r1.2 ChangeLog --- devs/framebuf/synth/current/ChangeLog 30 Dec 2008 21:47:14 -0000 1.2 +++ devs/framebuf/synth/current/ChangeLog 8 Jan 2009 16:53:39 -0000 @@ -1,5 +1,9 @@ +2009-01-08 John Dallaway <[email protected]> + + * src/gen_synthfb.tcl: Specify script interpreter via /usr/bin/env. + 2008-12-30 John Dallaway <[email protected]> * cdl/framebuf_synth.cdl: Reference per-package documentation. 2008-10-06 Bart Veer <[email protected]> Index: devs/framebuf/synth/current/src/gen_synthfb.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/framebuf/synth/current/src/gen_synthfb.tcl,v retrieving revision 1.1 diff -u -5 -r1.1 gen_synthfb.tcl --- devs/framebuf/synth/current/src/gen_synthfb.tcl 7 Oct 2008 21:10:17 -0000 1.1 +++ devs/framebuf/synth/current/src/gen_synthfb.tcl 8 Jan 2009 16:53:40 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "gen_synthfb.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # gen_synthfb.tcl # Index: fs/rom/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/fs/rom/current/ChangeLog,v retrieving revision 1.23 diff -u -5 -r1.23 ChangeLog --- fs/rom/current/ChangeLog 14 Aug 2008 20:10:52 -0000 1.23 +++ fs/rom/current/ChangeLog 8 Jan 2009 16:53:40 -0000 @@ -1,5 +1,9 @@ +2009-01-08 John Dallaway <[email protected]> + + * support/file2c.tcl: Specify script interpreter via /usr/bin/env. + 2008-08-14 Klaas Gadeyne <[email protected]> 2008-08-14 Jonathan Larmour <[email protected]> * doc/mk_romfs.txt (Usage): Remove documentation about obsolete CYGNUM_FS_ROM_BASE_ADDRESS option, and replace with better Index: fs/rom/current/support/file2c.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/fs/rom/current/support/file2c.tcl,v retrieving revision 1.5 diff -u -5 -r1.5 file2c.tcl --- fs/rom/current/support/file2c.tcl 14 Nov 2007 14:08:06 -0000 1.5 +++ fs/rom/current/support/file2c.tcl 8 Jan 2009 16:53:40 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "file2c.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # file2c.tcl # Index: hal/mips/ref4955/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/mips/ref4955/current/ChangeLog,v retrieving revision 1.9 diff -u -5 -r1.9 ChangeLog --- hal/mips/ref4955/current/ChangeLog 22 Apr 2004 15:26:42 -0000 1.9 +++ hal/mips/ref4955/current/ChangeLog 8 Jan 2009 16:53:41 -0000 @@ -1,5 +1,10 @@ +2009-01-08 John Dallaway <[email protected]> + + * misc/slow_cat.tcl, misc/swap4.tcl: + Specify script interpreter via /usr/bin/env. + 2004-04-22 Jani Monoses <[email protected]> * cdl/hal_mips_tx49_ref4955.cdl : Invoke tail with stricter syntax that works in latest coreutils. Index: hal/mips/ref4955/current/misc/slow_cat.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/mips/ref4955/current/misc/slow_cat.tcl,v retrieving revision 1.2 diff -u -5 -r1.2 slow_cat.tcl --- hal/mips/ref4955/current/misc/slow_cat.tcl 29 Jan 2003 12:45:02 -0000 1.2 +++ hal/mips/ref4955/current/misc/slow_cat.tcl 8 Jan 2009 16:53:41 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "slow_cat.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh # Can be used like this: # Get flash ready for programming using Minicom or similar # [o (Option menu), a (flAsh menu), b (Boot write)] # Then execute the following Index: hal/mips/ref4955/current/misc/swap4.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/mips/ref4955/current/misc/swap4.tcl,v retrieving revision 1.2 diff -u -5 -r1.2 swap4.tcl --- hal/mips/ref4955/current/misc/swap4.tcl 29 Jan 2003 12:45:02 -0000 1.2 +++ hal/mips/ref4955/current/misc/swap4.tcl 8 Jan 2009 16:53:41 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "swap4.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh proc filter { input_file output_file } { set input_fd [open $input_file "r"] set output_fd [open $output_file "w"] Index: hal/arm/e7t/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/e7t/current/ChangeLog,v retrieving revision 1.15 diff -u -5 -r1.15 ChangeLog --- hal/arm/e7t/current/ChangeLog 22 Apr 2004 15:26:25 -0000 1.15 +++ hal/arm/e7t/current/ChangeLog 8 Jan 2009 16:53:41 -0000 @@ -1,5 +1,9 @@ +2009-01-08 John Dallaway <[email protected]> + + * src/flash_cksum.tcl: Specify script interpreter via /usr/bin/env. + 2004-04-22 Jani Monoses <[email protected]> * cdl/hal_arm_e7t.cdl : Invoke tail with stricter syntax that works in latest coreutils. Index: hal/arm/e7t/current/src/flash_cksum.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/e7t/current/src/flash_cksum.tcl,v retrieving revision 1.4 diff -u -5 -r1.4 flash_cksum.tcl --- hal/arm/e7t/current/src/flash_cksum.tcl 29 Jan 2003 12:45:02 -0000 1.4 +++ hal/arm/e7t/current/src/flash_cksum.tcl 8 Jan 2009 16:53:41 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "flash_cksum.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # flash_cksum.tcl # Index: hal/arm/aeb/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/aeb/current/ChangeLog,v retrieving revision 1.30 diff -u -5 -r1.30 ChangeLog --- hal/arm/aeb/current/ChangeLog 22 Apr 2004 15:26:20 -0000 1.30 +++ hal/arm/aeb/current/ChangeLog 8 Jan 2009 16:53:42 -0000 @@ -1,5 +1,9 @@ +2009-01-08 John Dallaway <[email protected]> + + * src/flash_cksum.tcl: Specify script interpreter via /usr/bin/env. + 2004-04-22 Jani Monoses <[email protected]> * cdl/hal_arm_aeb.cdl : Invoke tail with stricter syntax that works in latest coreutils. Index: hal/arm/aeb/current/src/flash_cksum.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/aeb/current/src/flash_cksum.tcl,v retrieving revision 1.8 diff -u -5 -r1.8 flash_cksum.tcl --- hal/arm/aeb/current/src/flash_cksum.tcl 29 Jan 2003 12:45:02 -0000 1.8 +++ hal/arm/aeb/current/src/flash_cksum.tcl 8 Jan 2009 16:53:43 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "flash_cksum.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # flash_cksum.tcl # Index: io/framebuf/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/io/framebuf/current/ChangeLog,v retrieving revision 1.2 diff -u -5 -r1.2 ChangeLog --- io/framebuf/current/ChangeLog 9 Nov 2008 11:44:31 -0000 1.2 +++ io/framebuf/current/ChangeLog 8 Jan 2009 16:53:43 -0000 @@ -1,5 +1,9 @@ +2009-01-08 John Dallaway <[email protected]> + + * src/gen_framebufs.tcl: Specify script interpreter via /usr/bin/env. + 2008-11-09 Bart Veer <[email protected]> * src/linear.c: fix the block move operations (new_y > y) overlap handling. Index: io/framebuf/current/src/gen_framebufs.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/io/framebuf/current/src/gen_framebufs.tcl,v retrieving revision 1.1 diff -u -5 -r1.1 gen_framebufs.tcl --- io/framebuf/current/src/gen_framebufs.tcl 7 Oct 2008 10:15:04 -0000 1.1 +++ io/framebuf/current/src/gen_framebufs.tcl 8 Jan 2009 16:53:43 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "gen_framebufs.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # gen_framebufs.tcl # Index: services/memalloc/common/current/ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/ChangeLog,v retrieving revision 1.45 diff -u -5 -r1.45 ChangeLog --- services/memalloc/common/current/ChangeLog 19 Dec 2008 05:49:15 -0000 1.45 +++ services/memalloc/common/current/ChangeLog 8 Jan 2009 16:53:44 -0000 @@ -1,5 +1,11 @@ +2009-01-08 John Dallaway <[email protected]> + + * src/heapgen.tcl: Specify script interpreter via /usr/bin/env. + * cdl/memalloc.cdl: Simplify heaps.cxx make rule - cygtclsh80 is + no-longer supported. + 2008-12-19 Jonathan Larmour <[email protected]> * src/dlmalloc.cxx (MALLOC_COPY): Reinstate fix of 2008-01-06 (reverting change of 2008-11-03). * cdl/memalloc.cdl (CYGIMP_MEMALLOC_ALLOCATOR_DLMALLOC_USE_MEMCPY): Index: services/memalloc/common/current/cdl/memalloc.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/cdl/memalloc.cdl,v retrieving revision 1.18 diff -u -5 -r1.18 memalloc.cdl --- services/memalloc/common/current/cdl/memalloc.cdl 19 Dec 2008 05:49:15 -0000 1.18 +++ services/memalloc/common/current/cdl/memalloc.cdl 8 Jan 2009 16:53:45 -0000 @@ -279,16 +279,13 @@ @rm heapgen.tmp } # FIXME this should have a dependency on mlt_headers, but CDL doesn't # permit custom build rules depending on phony targets - # FIXME we workaround an NT cygtclsh80 bug by cd'ing into the - # correct dir and running heapgen.tcl from there rather than passing - # an absolute path. make -priority 50 { - heaps.cxx : heapgeninc.tcl <PACKAGE>/src/heapgen.tcl - XPWD=`pwd` ; cd $(REPOSITORY)/$(PACKAGE)/src ; sh heapgen.tcl "$(PREFIX)" "$$XPWD" + heaps.cxx : <PACKAGE>/src/heapgen.tcl heapgeninc.tcl + $< "$(PREFIX)" "`pwd`" @cp heaps.hxx "$(PREFIX)"/include/pkgconf/heaps.hxx @chmod u+w "$(PREFIX)"/include/pkgconf/heaps.hxx } make_object { Index: services/memalloc/common/current/src/heapgen.tcl =================================================================== RCS file: /cvs/ecos/ecos/packages/services/memalloc/common/current/src/heapgen.tcl,v retrieving revision 1.10 diff -u -5 -r1.10 heapgen.tcl --- services/memalloc/common/current/src/heapgen.tcl 24 Oct 2007 13:25:46 -0000 1.10 +++ services/memalloc/common/current/src/heapgen.tcl 8 Jan 2009 16:53:45 -0000 @@ -1,11 +1,6 @@ -#!/bin/bash -# restart using a Tcl shell \ - exec sh -c 'for tclshell in tclsh tclsh83 cygtclsh80 ; do \ - ( echo | $tclshell ) 2> /dev/null && exec $tclshell "`( cygpath -w \"$0\" ) 2> /dev/null || echo $0`" "$@" ; \ - done ; \ - echo "heapgen.tcl: cannot find Tcl shell" ; exit 1' "$0" "$@" +#!/usr/bin/env tclsh #=============================================================================== # # heapgen.tcl #
