source: trunk/base/src/Makefile.in @ 118562

Last change on this file since 118562 was 118559, checked in by cal@…, 6 years ago

base: remove macports_fastload.tcl, use correct Tcl, install port-tclsh for contrib software, specify LD_LIBRARY_PATH for intree Tcl for Linux, see #43208

macports_fastload.tcl contained two blocks of code: The first one was dead
because it was only used with Tcl < 8.5, the second one sourced the pkgIndex.tcl
files of all MacPorts Tcl packages. That was previously necessary to ensure
package require macports 1.0 would load the code from the correct prefix and
might also have improved performance because $auto_path of /usr/bin/tclsh
contains 10 entries. With our local copy of Tcl, the number of files read is
around 100 at most, so I think that's a non-issue from a performance POV. We
don't need the preloading to select the correct MacPorts prefix, because the
selection of the Tcl interpreter now does that for us correctly.

For this to work correctly, every Tcl file must now be executed with the correct
Tcl interpreter -- that replaces sourcing macports_fastload.tcl from the correct
prefix. Some of our install scripts still used /usr/bin/env tclsh.

This change also solves a potential build problem on Linux in src/pkg_mkindex.sh
because the Tcl library matching the in-tree Tcl interpreter might not be found
without LD_LIBRARY_PATH.

Furthermore, this adds a $prefix/bin/port-tclsh wrapper script that should be
used by contrib tools that need to use the MacPorts API. The shebang line should
be

#!/usr/bin/env port-tclsh

which will cause the contrib script to automatically work on the port
installation currently first in $PATH.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 424 bytes
Line 
1srcdir = @srcdir@
2VPATH  = @srcdir@
3
4TCLPKG=         cregistry \
5                        registry2.0 \
6                        macports1.0 \
7                        port1.0 \
8                        package1.0 \
9                        pextlib1.0 \
10                        machista1.0
11SUBDIR=         ${TCLPKG} port programs
12
13ifeq (@TRACEMODE_SUPPORT@,1)
14TCLPKG+= darwintracelib1.0
15endif
16
17all::
18
19distclean::
20        rm -f config.h
21        rm -f Makefile
22        rm -f pkg_mkindex.sh
23        rm -f dedup_portfiles.tcl images_to_archives.tcl
24
25test::
26
27include $(srcdir)/../Mk/macports.subdir.mk
Note: See TracBrowser for help on using the repository browser.