reorganize into core plus packages
The "racket" directory contains a pared-back version of the repository, roughly. The "pkgs" directory everything else in the repository, but organized into packages.
This commit is contained in:
parent
0f3bb2dbd0
commit
b2ebb0a28b
27
.gitignore
vendored
27
.gitignore
vendored
|
@ -1,27 +1,8 @@
|
|||
# these directories are generated by the build
|
||||
/bin/
|
||||
/include/
|
||||
/lib/
|
||||
/build/
|
||||
/bundle/
|
||||
|
||||
# Windows and OSX executables
|
||||
/*.app
|
||||
/*.exe
|
||||
|
||||
# Windows linking and debugging
|
||||
/*.pdb
|
||||
/*.ilk
|
||||
/*.suo
|
||||
/GRacket.exe.manifest
|
||||
/Racket.exe.manifest
|
||||
|
||||
# a common convenient place to set the PLTADDON directory to
|
||||
/add-on/
|
||||
|
||||
# a common convenient place to set the PLTCOMPILEDROOTS directory to
|
||||
/zos/
|
||||
|
||||
# location for cached DrDr report files
|
||||
/house-calls/
|
||||
compiled/
|
||||
doc/
|
||||
|
||||
# common backups, autosaves, lock files, OS meta-files
|
||||
*~
|
||||
|
|
203
INSTALL.txt
Normal file
203
INSTALL.txt
Normal file
|
@ -0,0 +1,203 @@
|
|||
Building Racket
|
||||
===============
|
||||
|
||||
The "racket" directory contains a stripped down version of Racket ---
|
||||
enough to run `raco pkg' to install everything else.
|
||||
|
||||
The "pkgs" directory contains the packages that are included in a
|
||||
Racket distribution.
|
||||
|
||||
On Unix and Mac OS X, you can build Racket plus the included packages
|
||||
with `make in-place' (or just `make'). The resulting build is in the
|
||||
"racket" subdirectory. For now, you need to have `git' installed for
|
||||
downloading native-library packages. If you want more control over the
|
||||
process, see below.
|
||||
|
||||
On Windows, you must first clone "git://github.com/plt/libs.git"
|
||||
as "build/native-pkgs". Then, you can use `nmake win32-in-place'.
|
||||
|
||||
|
||||
Building Core Racket
|
||||
====================
|
||||
|
||||
Instead of using the top-level makefile, you can go into "racket/src"
|
||||
and follow the "README" there, which gives you more configuration
|
||||
options.
|
||||
|
||||
If you don't want any special configuration and you just want the core
|
||||
build, you can use `make core' (or `nmake win32-core') with the
|
||||
top-level makefile.
|
||||
|
||||
|
||||
Installing Packages
|
||||
===================
|
||||
|
||||
In the near future, after you've built the core, you can install
|
||||
packages via a package-catalog server (ignoring the content of
|
||||
"pkgs"). That catalog server is not ready, yet.
|
||||
|
||||
|
||||
Linking Packages for Development Mode
|
||||
=====================================
|
||||
|
||||
Aside from the issue of native-library packages, using all of the
|
||||
packages in "pkgs" corresponds to a build that is like the main Racket
|
||||
distribution. Furthermore, if you install all of those packages with
|
||||
`raco pkg install -i --link ...', then you can edit libraries or
|
||||
update via `git pull' plus `raco setup' (as opposed to updating or
|
||||
reinstalling packages).
|
||||
|
||||
The `pkg-links' target of the makefile links (or re-links) packages
|
||||
from "pkgs" into the "racket" build. (The `in-place' target of the
|
||||
makefile uses `pkg-links'.) Packages are linked using installation
|
||||
scope, so that the links affect only the build in the "racket"
|
||||
directory. Use the `pkg-links' target whenever the set of native
|
||||
packages or packages in "pkgs" changes. Packages are linked with the
|
||||
`--no-setup' flag (effectively), which means that a `raco setup' is
|
||||
needed after installing links.
|
||||
|
||||
Native-library packages provide (on Mac OS X and Windows) pre-built
|
||||
native libraries, such as Cario. Currently, the libraries must be
|
||||
downloaded from GitHub. On a non-Windows platform, the
|
||||
`native-from-git' makefile target clones/updates the native-library
|
||||
reposiroty from GitHub; otherwise, clone
|
||||
|
||||
git://github.com/plt/libs.git
|
||||
|
||||
as
|
||||
|
||||
build/native-pkgs
|
||||
|
||||
When you have a "build/native-pkgs" directory, then the `pkg-links'
|
||||
makefile target also links relavant native packages.
|
||||
|
||||
You need a "racket" build before linking packages. So, to get set up:
|
||||
|
||||
git clone git://github.com/mflatt/racket.git plt
|
||||
cd plt
|
||||
git checkout pkg
|
||||
|
||||
make core
|
||||
|
||||
# Mac OS X:
|
||||
make native-from-git
|
||||
# Windows:
|
||||
git clone git://github.com/plt/libs.git build/native-pkgs
|
||||
|
||||
make pkg-links
|
||||
racket/bin/raco setup
|
||||
|
||||
|
||||
Trying Packages Locally
|
||||
=======================
|
||||
|
||||
Suppose that you've built core "racket" and you want to see what
|
||||
it looks like to install individual packages.
|
||||
|
||||
Use `make local-catalog' to create a package catalog that provides
|
||||
mappings for all of the packages in "pkgs" as well as packages
|
||||
pre-built native libraries downloaded from GitHub. (On Unix, use the
|
||||
`local-source-catalog' makefile target to skip native libraries, since
|
||||
none are needed.)
|
||||
|
||||
To install a package, try
|
||||
|
||||
racket/bin/raco pkg install -i --catalog build/local/catalog --deps search-auto <pkg-name>
|
||||
|
||||
The `-i' flag makes the package install specific to the build in the
|
||||
"racket" directory. The `--catalog build/local/catalog' causes the
|
||||
installation to use the catalog created by the `local-catalog'
|
||||
makefile target. The `--deps search-auto' flag installs dependencies
|
||||
(from the local catalog) automatically.
|
||||
|
||||
To remove the package, try
|
||||
|
||||
racket/bin/raco pkg remove -i --auto <pkg-name>
|
||||
|
||||
The `--auto' flag undoes automatic installs from `--deps search-auto'.
|
||||
|
||||
If you try out packages in this way, clean out all package
|
||||
installations before trying to create installers (as described in the
|
||||
next section), because the distribution-bundle process expects a core
|
||||
build in "racket" that has no installed packages.
|
||||
|
||||
|
||||
Building Installers
|
||||
===================
|
||||
|
||||
To build distribution installers, do not use `make in-place' or just
|
||||
`make', but instead start from a clean repository.
|
||||
|
||||
Use one non-Windows machine as a server, where packages will be
|
||||
pre-built. Then, create platform-specific installers on N client
|
||||
machines, each of which contacts the server machine to obtain
|
||||
pre-built packages. The server can act as a client, naturally, to
|
||||
create an installer for the server's platform.
|
||||
|
||||
Roughly, the steps are
|
||||
|
||||
1. On the server machine:
|
||||
make server PKGS="..."
|
||||
|
||||
2. On each client machine:
|
||||
make client SERVER=... PKGS="..."
|
||||
or
|
||||
nmake win32-client SERVER=... PKGS="..."
|
||||
|
||||
Add `RELEASE_MODE=--release' to the `client' line to build
|
||||
a "release" installer, as opposed to a snapshot installer.
|
||||
|
||||
In more detail:
|
||||
|
||||
1a. Build "racket" on a server.
|
||||
|
||||
The `core' target of the makefile will do that, if you haven't
|
||||
done it already. On Windows, use `nmake win32-core'.
|
||||
|
||||
1b. On the server, build packages and start a catalog server.
|
||||
|
||||
The `server-from-core' target of the makefile will do that. (The
|
||||
server only works on non-Windows platforms, currently.)
|
||||
|
||||
Alternatively, use the `server' target, which combines `core' and
|
||||
`server-from-core' (i.e., steps 1a and 1b).
|
||||
|
||||
The `PKGS' variable of the makefile determines which packages are
|
||||
built for potential inclusion in a distribution.
|
||||
|
||||
The `SRC_CATALOG' variable determines the catalog that is used to
|
||||
get package sources and native-library packages, but a value of
|
||||
"local" triggers a bootstrap mode where native libraries are
|
||||
downloaded directly from GitHub and all other packages are
|
||||
represented by directories in the makefile's directory. For now,
|
||||
"local" is the default.
|
||||
|
||||
If you stop the server and want to restart it, use the
|
||||
`built-package-server' makefile target instead of starting over
|
||||
with the `server' target.
|
||||
|
||||
2a. On each client (one for each platform to bundle), build "racket".
|
||||
|
||||
This is the same as step 1, but on each client. If the client and
|
||||
server are the same, there's nothing more to do for step 3.
|
||||
|
||||
2b. On each client, create an installer.
|
||||
|
||||
The `client' (or `win32-client') target of the makefile will do
|
||||
that. Provide `SERVER' as the hostname of the server machine, and
|
||||
provide the same `PKGS' (or a subset) as in step 1b if you want a
|
||||
different set than the ones listed in the makefile.
|
||||
|
||||
Alternatively, use the `client' target, which combines `core' and
|
||||
`client-from-core' (i.e., steps 2a and 2b).
|
||||
|
||||
To create a release installer, provide `RELEASE_MODE' as
|
||||
"--release". A release installer has slightly different defaults
|
||||
that are suitable for infrequently updated release installations,
|
||||
as opposed to ferquently updated snapshot installations.
|
||||
|
||||
On Windows, you need NSIS installed, either in the usual location
|
||||
or with `makensis' in your command-line path.
|
||||
|
||||
On each client, step 2b produces a "bundle/installer.txt" file that
|
||||
contains the path to the generated installer.
|
269
Makefile
Normal file
269
Makefile
Normal file
|
@ -0,0 +1,269 @@
|
|||
# This makefile is meant to parse with both normal `make' and `nmake'
|
||||
# (on Windows). On Windows, prefix each target with `win32-'.
|
||||
|
||||
# The targets here do not use dependencies (mostly), so it's a strange
|
||||
# use of `make'. Really, this makefile is an alternative to a pile of
|
||||
# scripts, where each target plays the role of a script.
|
||||
|
||||
# The main targets are
|
||||
#
|
||||
# in-place = build in "racket" with all packages in development mode
|
||||
#
|
||||
# core = build in "racket" only (i.e., first step of `in-place')
|
||||
#
|
||||
# server = build core, build packages listed in $(PKGS), start
|
||||
# server at port 9440
|
||||
#
|
||||
# client = build core, create an installer with $(PKGS) with the help
|
||||
# of $(SERVER); result is recorded in "bundle/installer.txt"
|
||||
#
|
||||
# Some smaller steps:
|
||||
#
|
||||
# server-from-core = the part of `server' after the core is built,
|
||||
# which is useful if you want to run `configure',
|
||||
# etc., manually
|
||||
#
|
||||
# client-from-core = the part of `client' after the core is built
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# In-place build
|
||||
|
||||
PLAIN_RACKET = racket/bin/racket
|
||||
WIN32_PLAIN_RACKET = racket\racket
|
||||
|
||||
MACOSX_CHECK = $(PLAIN_RACKET) -I racket/base -e '(case (system-type) [(macosx) (exit 0)] [else (exit 1)])'
|
||||
|
||||
in-place:
|
||||
$(MAKE) core
|
||||
if $(MACOSX_CHECK) ; then $(MAKE) native-from-git ; fi
|
||||
$(MAKE) pkg-links
|
||||
$(PLAIN_RACKET) -N raco -l- raco setup $(PLT_SETUP_OPTIONS)
|
||||
|
||||
win32-in-place:
|
||||
$(MAKE) win32-core
|
||||
$(MAKE) win32-pkg-links
|
||||
$(WIN32_PLAIN_RACKET) -N raco -l- raco setup $(PLT_SETUP_OPTIONS)
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Core build
|
||||
|
||||
core:
|
||||
mkdir -p racket/src/build
|
||||
$(MAKE) racket/src/build/Makefile
|
||||
cd racket/src/build; $(MAKE) reconfigure
|
||||
cd racket/src/build; $(MAKE) SELF_RACKET_FLAGS="-G ."
|
||||
cd racket/src/build; $(MAKE) install SELF_RACKET_FLAGS="-G ."
|
||||
|
||||
win32-core:
|
||||
cmd /c racket\src\worksp\build-at racket\src\worksp
|
||||
|
||||
racket/src/build/Makefile: racket/src/configure racket/src/Makefile.in
|
||||
cd racket/src/build; ../configure
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Configuration options for building installers
|
||||
|
||||
# Packages to include in a distribution:
|
||||
PKGS = drracket
|
||||
|
||||
# Catalog for sources and native packages; use "local" to bootstrap
|
||||
# from package directories (in the same directory as this makefile)
|
||||
# plus the GitHub repository of raw native libraries.
|
||||
SRC_CATALOG = local
|
||||
|
||||
# Server for built packages (i.e., the host where you'll run the
|
||||
# server):
|
||||
SERVER = localhost
|
||||
|
||||
# Set to "--release" to created release-mode installers (as opposed to
|
||||
# snapshot installers):
|
||||
RELEASE_MODE =
|
||||
|
||||
# Human-readable name and installation-directory name for the
|
||||
# generated installers:
|
||||
DIST_NAME = Racket
|
||||
DIST_DIR = racket
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Helpers
|
||||
|
||||
# Needed for any distribution:
|
||||
REQUIRED_PKGS = racket-lib
|
||||
|
||||
# Packages needed for building distribution:
|
||||
DISTRO_BUILD_PKGS = distro-build
|
||||
|
||||
# To bootstrap, we use some "distro-build" libraries directly,
|
||||
# instead of from an installed package:
|
||||
DISTBLD = pkgs/distro-build
|
||||
|
||||
# Helper macros:
|
||||
ADDON = build/user
|
||||
RACKET = racket/bin/racket -A "$(ADDON)"
|
||||
RACO = racket/bin/racket -A "$(ADDON)" -N raco -l- raco
|
||||
WIN32_RACKET = racket\racket -A "$(ADDON)"
|
||||
WIN32_RACO = racket\racket -A "$(ADDON)" -N raco -l- raco
|
||||
USER_AUTO_OPTIONS = --scope user --skip-installed --deps search-auto
|
||||
LOCAL_USER_AUTO = --catalog build/local/catalog $(USER_AUTO_OPTIONS)
|
||||
SOURCE_USER_AUTO = --catalog "$(SRC_CATALOG)" $(USER_AUTO_OPTIONS)
|
||||
REMOTE_USER_AUTO = --catalog http://$(SERVER):9440/ $(USER_AUTO_OPTIONS)
|
||||
REMOTE_INST_AUTO = --catalog http://$(SERVER):9440/ --scope installation --deps search-auto
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Linking all packages (i.e., not an installer build)
|
||||
|
||||
pkg-links:
|
||||
$(PLAIN_RACKET) racket/src/link-all.rkt --platform build/native-pkgs
|
||||
$(PLAIN_RACKET) racket/src/link-all.rkt pkgs
|
||||
|
||||
win32-pkg-links:
|
||||
$(MAKE) pkg-links PLAIN_RACKET="$(WIN32_PLAIN_RACKET)"
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# On a server platform:
|
||||
|
||||
server:
|
||||
$(MAKE) core
|
||||
$(MAKE) server-from-core
|
||||
|
||||
server-from-core:
|
||||
if [ "$(EEAPP)" = '' ] ; then $(MAKE) build-from-local ; else $(MAKE) build-from-catalog ; fi
|
||||
$(MAKE) origin-collects
|
||||
$(MAKE) built-catalog
|
||||
$(MAKE) built-catalog-server
|
||||
|
||||
# Boostrap mode: make packages from local directories:
|
||||
build-from-local:
|
||||
$(MAKE) native-and-local-catalog
|
||||
$(MAKE) local-build
|
||||
$(MAKE) packages-from-local
|
||||
|
||||
# Set up a local catalog (useful on its own):
|
||||
local-catalog:
|
||||
$(MAKE) native-from-git
|
||||
$(MAKE) native-catalog
|
||||
$(MAKE) local-source-catalog
|
||||
|
||||
# Get pre-built native libraries from the repo:
|
||||
native-from-git:
|
||||
mkdir -p build
|
||||
if [ ! -d build/native-pkgs ]; then cd build; git clone git://github.com/plt/libs.git native-pkgs ; fi
|
||||
cd build/native-pkgs; git pull
|
||||
|
||||
# Create packages and a catalog for all native libraries:
|
||||
native-catalog:
|
||||
$(RACKET) $(DISTBLD)/pack-native.rkt
|
||||
|
||||
# Create a catalog for all packages in this directory:
|
||||
local-source-catalog:
|
||||
$(RACKET) $(DISTBLD)/catalog-local.rkt
|
||||
|
||||
# Clear out a package build in "build/user", and then install
|
||||
# packages:
|
||||
local-build:
|
||||
rm -rf build/user
|
||||
$(MAKE) packages-from-local
|
||||
|
||||
# Install packages from the source copies in this directory. The
|
||||
# packages are installed in user scope, but we set the add-on
|
||||
# directory to "build/user", so that we don't affect the actual
|
||||
# current user's installation (and to a large degree we're insulated
|
||||
# from it):
|
||||
packages-from-local:
|
||||
$(RACO) pkg install $(LOCAL_USER_AUTO) $(PKGS) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
|
||||
$(RACO) setup --avoid-main
|
||||
|
||||
# Install packages from a source catalog (as an alternative to
|
||||
# `build-from-local'), where the source catalog is specified as
|
||||
# `SRC_CATALOG':
|
||||
build-from-catalog:
|
||||
$(RACO) pkg install $(SOURCE_USER_AUTO) $(PKGS) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
|
||||
$(RACO) setup --avoid-main
|
||||
|
||||
# Although a client will build its own "collects", pack up the
|
||||
# server's version to be used by each client, so that every client has
|
||||
# exactly the same bytecode (which matters for SHA1-based dependency
|
||||
# tracking):
|
||||
origin-collects:
|
||||
$(RACKET) -l distro-build/pack-collects
|
||||
|
||||
# Now that we've built packages from local sources, create "built"
|
||||
# versions of the packages from the installation into "build/user":
|
||||
built-catalog:
|
||||
$(RACKET) -l distro-build/pack-built
|
||||
|
||||
# Run a catalog server to provide pre-built packages, as well
|
||||
# as the copy of the server's "collects" tree:
|
||||
built-catalog-server:
|
||||
$(RACKET) -l distro-build/serve-catalog
|
||||
|
||||
# Demonstrate how a catalog server for binary packages works,
|
||||
# which involves creating package archives in "binary" mode
|
||||
# instead of "built" mode:
|
||||
binary-catalog:
|
||||
$(RACKET) -l- distro-build/pack-built --mode binary
|
||||
binary-catalog-server:
|
||||
$(RACKET) -l- distro-build/serve-catalog --mode binary
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# On each supported platform:
|
||||
|
||||
client:
|
||||
$(MAKE) core
|
||||
$(MAKE) client-from-core
|
||||
|
||||
client-from-core:
|
||||
$(MAKE) distro-build-from-server
|
||||
$(MAKE) bundle-from-server
|
||||
$(MAKE) installer-from-bundle
|
||||
|
||||
COPY_ARGS = SERVER=$(SERVER) PKGS="$(PKGS)" RELEASE_MODE=$(RELEASE_MODE) DIST_NAME="$(DIST_NAME)" DIST_DIR=$(DIST_DIR)
|
||||
|
||||
win32-client:
|
||||
$(MAKE) win32-core $(COPY_ARGS)
|
||||
$(MAKE) win32-client-from-core $(COPY_ARGS)
|
||||
|
||||
win32-client-from-core:
|
||||
$(MAKE) win32-distro-build-from-server $(COPY_ARGS)
|
||||
$(MAKE) win32-bundle-from-server $(COPY_ARGS)
|
||||
$(MAKE) win32-installer-from-bundle $(COPY_ARGS)
|
||||
|
||||
# Install the "distro-build" package from the server into
|
||||
# a local build:
|
||||
distro-build-from-server:
|
||||
$(RACO) pkg install $(REMOTE_USER_AUTO) distro-build
|
||||
|
||||
# Copy our local build into a "bundle/racket" build, dropping in the
|
||||
# process things that should not be in an installer (such as the "src"
|
||||
# directory). Then, replace the "collects" tree with the one from the
|
||||
# server. Finally, install pre-built packages from the server:
|
||||
bundle-from-server:
|
||||
rm -rf bundle
|
||||
mkdir -p bundle/racket
|
||||
$(RACKET) -l setup/unixstyle-install bundle racket bundle/racket
|
||||
$(RACKET) -l distro-build/unpack-collects http://$(SERVER):9440/
|
||||
bundle/racket/bin/raco pkg install $(REMOTE_INST_AUTO) $(PKGS) $(REQUIRED_PKGS)
|
||||
|
||||
# Create an installer from the build (with installed packages) that's
|
||||
# in "bundle/racket":
|
||||
installer-from-bundle:
|
||||
$(RACKET) -l distro-build/installer $(RELEASE_MODE) "$(DIST_NAME)" $(DIST_DIR)
|
||||
|
||||
win32-distro-build-from-server:
|
||||
$(WIN32_RACO) pkg install $(REMOTE_USER_AUTO) distro-build
|
||||
|
||||
win32-bundle:
|
||||
IF EXIST bundle cmd /c rmdir /S /Q bundle
|
||||
cmd /c mkdir bundle\racket
|
||||
$(WIN32_RACKET) -l setup/unixstyle-install bundle racket bundle\racket
|
||||
$(WIN32_RACKET) -l setup/winstrip bundle\racket
|
||||
$(WIN32_RACKET) -l setup/winvers-change bundle\racket
|
||||
|
||||
win32-bundle-from-server:
|
||||
$(MAKE) win32-bundle $(COPY_ARGS)
|
||||
$(WIN32_RACKET) -l distro-build/unpack-collects http://$(SERVER):9440/
|
||||
bundle\racket\raco pkg install $(REMOTE_INST_AUTO) $(REQUIRED_PKGS)
|
||||
bundle\racket\raco pkg install $(REMOTE_INST_AUTO) $(PKGS)
|
||||
|
||||
win32-installer-from-bundle:
|
||||
$(WIN32_RACKET) -l distro-build/installer $(RELEASE_MODE) "$(DIST_NAME)" $(DIST_DIR)
|
39
README
39
README
|
@ -1,39 +0,0 @@
|
|||
The Racket Programming Language
|
||||
===============================
|
||||
|
||||
Instructions for building Racket from source are in src/README.
|
||||
|
||||
The main executables in this package:
|
||||
|
||||
* DrRacket: Racket's integrated development environment (start here!).
|
||||
|
||||
* racket: command-line tool for running Racket programs.
|
||||
|
||||
* raco: command-line tool for compilation, documentation, and more.
|
||||
|
||||
|
||||
More Information
|
||||
----------------
|
||||
|
||||
For Racket documentation, use DrRacket's `Help' menu, run the `Racket
|
||||
Documentation' application (Windows or Mac OS X), or run `raco docs'
|
||||
from a command line.
|
||||
|
||||
Visit us at
|
||||
http://racket-lang.org/
|
||||
for more Racket resources.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Racket
|
||||
Copyright (c) 2010-2013 PLT Design Inc.
|
||||
|
||||
Racket is distributed under the GNU Lesser General Public License
|
||||
(LGPL). This means that you can link Racket into proprietary
|
||||
applications, provided you follow the rules stated in the LGPL. You can
|
||||
also modify Racket; if you distribute a modified version, you must
|
||||
distribute it under the terms of the LGPL, which in particular means
|
||||
that you must release the source code for the modified software. See
|
||||
doc/release-notes/COPYING_LESSER.txt for more information.
|
16
README.txt
Normal file
16
README.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
This is the source code for the main Racket distribution. See
|
||||
"INSTALL.txt" for information on building Racket.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Racket
|
||||
Copyright (c) 2010-2013 PLT Design Inc.
|
||||
|
||||
Racket is distributed under the GNU Lesser General Public License
|
||||
(LGPL). This means that you can link Racket into proprietary
|
||||
applications, provided you follow the rules stated in the LGPL. You can
|
||||
also modify Racket; if you distribute a modified version, you must
|
||||
distribute it under the terms of the LGPL, which in particular means
|
||||
that you must release the source code for the modified software. See
|
||||
doc/release-notes/COPYING_LESSER.txt for more information.
|
1
collects/config/.gitignore
vendored
1
collects/config/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/links.rktd
|
|
@ -1,7 +0,0 @@
|
|||
;; The config module doesn't have to use `setup/configtab';
|
||||
;; it just has to have the right exports. But using
|
||||
;; `setup/configtab' makes it easier to generate the
|
||||
;; code at install time.
|
||||
(module config setup/configtab
|
||||
;; An empty table means that all defaults apply
|
||||
)
|
|
@ -1,124 +0,0 @@
|
|||
#lang scribble/doc
|
||||
@(require scribble/manual
|
||||
(for-label scheme/base
|
||||
scheme/contract
|
||||
config))
|
||||
|
||||
@title{Config: Installation and Search Paths}
|
||||
|
||||
@section{Configuring Directories and Search Paths}
|
||||
|
||||
@defmodule[config]{
|
||||
|
||||
The @racketmodname[config] library specifies the location of
|
||||
directories (such as the main documentation directory) and also
|
||||
directory search paths (such as a list of directories to search for
|
||||
documentation).}
|
||||
|
||||
|
||||
@bold{Note:} Instead of @racket[require]ing
|
||||
@racketmodname[config] directly, use the
|
||||
@racketmodname[setup/dirs] library, which combines information from
|
||||
@racketmodname[config] and other sources.
|
||||
|
||||
The @racketmodname[config] module must export the following
|
||||
values. In all cases where a @racket[delay]ed value is expected for an
|
||||
exported identifier, the value can be a @racket[delay]ed @racket[#f]
|
||||
to indicate the default.
|
||||
|
||||
@defthing[doc-dir (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
A @racket[delay]ed path, string, or byte string for the main
|
||||
documentation directory. It defaults to a @filepath{doc} sibling
|
||||
directory of the main collection directory.}
|
||||
|
||||
@defthing[lib-dir (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
A @racket[delay]ed path, string, or byte string for the main directory
|
||||
containing C libraries and build information; it defaults to a
|
||||
@filepath{lib} sibling directory of the main collection directory.}
|
||||
|
||||
@defthing[dll-dir (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
A @racket[delay]ed path, string, or byte string for a directory
|
||||
containing Unix shared libraries for the main executable; it defaults
|
||||
to the main C-library directory}
|
||||
|
||||
@defthing[include-dir (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
A @racket[delay]ed path, string, or byte string for the main directory
|
||||
containing C header files; it defaults to an @filepath{include}
|
||||
sibling directory of the main collection directory.}
|
||||
|
||||
@defthing[bin-dir (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
A @racket[delay]ed path, string, or byte string for the main directory
|
||||
containing executables; it defaults to a @filepath{bin} sibling
|
||||
directory of the main collection directory.}
|
||||
|
||||
@defthing[doc-search-dirs (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
A @racket[delay]ed path, string, byte string, or @racket[#f]
|
||||
representing the search path for documentation; each @racket[#f] in
|
||||
the list, if any, is replaced with the default search path, which is
|
||||
the user- and version-specific @filepath{doc} directory followed by
|
||||
the main documentation directory.}
|
||||
|
||||
@defthing[lib-search-dirs (promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
Like @racket[doc-search-dirs], but for directories containing C
|
||||
libraries and other build information}
|
||||
|
||||
@defthing[include-search-dirs(promise/c (or/c path? string? bytes? false/c))]{
|
||||
|
||||
Like @racket[doc-search-dirs], but for directories containing C header
|
||||
files}
|
||||
|
||||
@defthing[absolute-installation? boolean?]{
|
||||
|
||||
A (simple, non-@racket[delay]ed) boolean that is @racket[#t] if the
|
||||
installation uses absolute path names, @racket[#f] otherwise.}
|
||||
|
||||
@defthing[cgc-suffix (promise/c (or/c string? false/c))]{
|
||||
|
||||
A @racket[delay]ed string used as the suffix (before the actual
|
||||
suffix, such as @filepath{.exe}) for a @filepath{CGC} executable. Use
|
||||
Windows-style casing, and the string will be downcased as appropriate
|
||||
(e.g., for a Unix binary name). A @racket[#f] value means that if the
|
||||
@exec{mzscheme} binary identifies itself as CGC, then the suffix is
|
||||
@racket[""], otherwise it is @racket["CGC"].}
|
||||
|
||||
@defthing[3m-suffix (promise/c (or/c string? false/c))]{
|
||||
|
||||
Analogous to @racket[cgc-suffix], but for 3m. A @racket[#f] value
|
||||
means that if the @filepath{mzscheme} binary identifies itself as CGC,
|
||||
then the suffix is @racket["3m"], otherwise it is @racket[""].}
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
@section{Overriding the Installation's Configuration}
|
||||
|
||||
A user can override an installation's configuration through a
|
||||
@filepath{config} collection in the user's collection directory (which
|
||||
normally takes precedence over the main collection directory).
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
|
||||
@section{Configuration Language}
|
||||
|
||||
@defmodule[setup/configtab]{
|
||||
|
||||
The @racketmodname[setup/configtab] library defines a language module
|
||||
that can be used to implement @racketmodname[config].}
|
||||
|
||||
When @racketmodname[setup/configtab] is used as a language module, the
|
||||
module body must consist of a sequence of
|
||||
|
||||
@racketblock[(define _id _val)]
|
||||
|
||||
declarations, where each @racket[_id] is one of the names that the
|
||||
@racketmodname[config] library must export, and @racket[_val] is
|
||||
an expression for the value (which will be automatically wrapped with
|
||||
@racket[delay] when needed). If a required export has no corresponding
|
||||
@racket[define], a definition with @racket[#f] is inserted
|
||||
automatically.
|
|
@ -1,3 +0,0 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define scribblings '(("config.scrbl" () (tool-library))))
|
|
@ -1,4 +0,0 @@
|
|||
#lang racket/base
|
||||
|
||||
(require "config.rkt")
|
||||
(provide (all-from-out "config.rkt"))
|
|
@ -1,36 +0,0 @@
|
|||
#lang scribble/doc
|
||||
@(require scribble/manual
|
||||
scribble/extract
|
||||
(for-label file/gif))
|
||||
|
||||
@title[#:tag "gif"]{GIF File Writing}
|
||||
|
||||
@defmodule[file/gif]
|
||||
|
||||
The @racketmodname[file/gif] library provides functions for
|
||||
writing GIF files to a stream, including GIF files with multiple
|
||||
images and controls (such as animated GIFs).
|
||||
|
||||
A GIF stream is created by @racket[gif-start], and then individual
|
||||
images are written with @racket[gif-add-image]. Optionally,
|
||||
@racket[gif-add-control] inserts instructions for rendering the
|
||||
images. The @racket[gif-end] function ends the GIF stream.
|
||||
|
||||
A GIF stream can be in any one of the following states:
|
||||
|
||||
@itemize[
|
||||
|
||||
@item{@racket['init] : no images or controls have been added to the
|
||||
stream}
|
||||
|
||||
@item{@racket['image-or-control] : another image or control can be
|
||||
written}
|
||||
|
||||
@item{@racket['image] : another image can be written (but not a
|
||||
control, since a control was written)}
|
||||
|
||||
@item{@racket['done] : nothing more can be added}
|
||||
|
||||
]
|
||||
|
||||
@(include-extracted "../gif.rkt")
|
|
@ -1,5 +0,0 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define scribblings '(["scribblings/images.scrbl" (multi-page) (gui-library)]))
|
||||
|
||||
(define compile-omit-paths '("tests"))
|
|
@ -1,55 +0,0 @@
|
|||
#lang racket/base
|
||||
|
||||
(require launcher compiler/embed)
|
||||
(provide post-installer)
|
||||
|
||||
;; Platforms that get a `MrEd' executable:
|
||||
(define mred-exe-systems '(unix))
|
||||
|
||||
(define (post-installer path)
|
||||
(define variants (available-mred-variants))
|
||||
(when (memq (system-type) mred-exe-systems)
|
||||
(for ([v variants] #:when (memq v '(3m cgc)))
|
||||
(parameterize ([current-launcher-variant v])
|
||||
(create-embedding-executable
|
||||
(mred-program-launcher-path "MrEd")
|
||||
#:cmdline '("-I" "scheme/gui/init")
|
||||
#:variant v
|
||||
#:launcher? #t
|
||||
#:gracket? #t
|
||||
#:aux '((framework-root . #f)
|
||||
(dll-dir . #f)
|
||||
(relative? . #t))))))
|
||||
;; add a mred-text executable that uses the -z flag (preferring a script)
|
||||
(for ([vs '((script-3m 3m) (script-cgc cgc))])
|
||||
(let ([v (findf (lambda (v) (memq v variants)) vs)])
|
||||
(when v
|
||||
(parameterize ([current-launcher-variant v])
|
||||
(make-gracket-launcher
|
||||
'("-z")
|
||||
(mred-program-launcher-path "gracket-text")
|
||||
'([relative? . #t] [subsystem . console] [single-instance? . #f]
|
||||
;; the following two are required to avoid using a full path,
|
||||
;; should be removed when `relative?' will imply this
|
||||
[framework-root . #f] [dll-dir . #f]))
|
||||
(make-gracket-launcher
|
||||
'("-I" "scheme/gui/init" "-z")
|
||||
(mred-program-launcher-path "mred-text")
|
||||
'([relative? . #t] [subsystem . console] [single-instance? . #f]
|
||||
;; the following two are required to avoid using a full path,
|
||||
;; should be removed when `relative?' will imply this
|
||||
[framework-root . #f] [dll-dir . #f]))))))
|
||||
;; add bin/gracket and bin/mred script under OS X
|
||||
(when (eq? 'macosx (system-type))
|
||||
(for ([v variants] #:when (memq v '(script-3m script-cgc)))
|
||||
(parameterize ([current-launcher-variant v])
|
||||
(make-gracket-launcher
|
||||
'()
|
||||
(mred-program-launcher-path "GRacket")
|
||||
'([exe-name . "GRacket"] [relative? . #t]
|
||||
[framework-root . #f] [dll-dir . #f]))
|
||||
(make-gracket-launcher
|
||||
'()
|
||||
(mred-program-launcher-path "MrEd")
|
||||
'([exe-name . "GRacket"] [relative? . #t]
|
||||
[framework-root . #f] [dll-dir . #f]))))))
|
|
@ -1,27 +0,0 @@
|
|||
#lang racket/base
|
||||
|
||||
(require launcher)
|
||||
(provide post-installer)
|
||||
|
||||
(define (post-installer path)
|
||||
(define variants (available-mred-variants))
|
||||
;; add a gracket-text executable that uses the -z flag (preferring a script)
|
||||
(for ([vs '((script-3m 3m) (script-cgc cgc))])
|
||||
(let ([v (findf (lambda (v) (memq v variants)) vs)])
|
||||
(when v
|
||||
(parameterize ([current-launcher-variant v])
|
||||
(make-mred-launcher
|
||||
'("-z")
|
||||
(mred-program-launcher-path "gracket-text")
|
||||
'([relative? . #t] [subsystem . console] [single-instance? . #f]
|
||||
;; the following two are required to avoid using a full path,
|
||||
;; should be removed when `relative?' will imply this
|
||||
[framework-root . #f] [dll-dir . #f]))))))
|
||||
;; add a bin/gracket script under OS X
|
||||
(when (eq? 'macosx (system-type))
|
||||
(for ([v variants] #:when (memq v '(script-3m script-cgc)))
|
||||
(parameterize ([current-launcher-variant v])
|
||||
(make-mred-launcher null
|
||||
(mred-program-launcher-path "GRacket")
|
||||
'([exe-name . "GRacket"] [relative? . #t]
|
||||
[framework-root . #f] [dll-dir . #f]))))))
|
|
@ -1,13 +0,0 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define name "RackUnit")
|
||||
|
||||
(define blurb '((p "RackUnit is a unit testing framework based on the "
|
||||
" Extreme Programming unit test frameworks")))
|
||||
|
||||
(define scribblings '(("scribblings/rackunit.scrbl" (multi-page) (tool))))
|
||||
(define tools '(("tool.rkt")))
|
||||
(define tool-names '("RackUnit DrRacket integration"))
|
||||
|
||||
;; (define homepage "http://schematics.sourceforge.net/")
|
||||
;; (define url "http://schematics.sourceforge.net/")
|
|
@ -1,8 +0,0 @@
|
|||
#lang scribble/doc
|
||||
@(require scribble/manual drracket/acks "private/utils.rkt")
|
||||
|
||||
@main-page['acks]
|
||||
|
||||
@(get-general-acks)
|
||||
|
||||
@(get-translating-acks)
|
|
@ -1,108 +0,0 @@
|
|||
#lang racket/base
|
||||
;; Defines a language to be used by the "config.rkt" file
|
||||
|
||||
(require racket/promise
|
||||
(for-syntax racket/base))
|
||||
|
||||
(provide (rename-out [config-module-begin #%module-begin])
|
||||
define
|
||||
#%datum quote)
|
||||
|
||||
;; These are the name that need to be provided
|
||||
;; by the "config.rkt" library:
|
||||
(define-for-syntax path-exports
|
||||
'(doc-dir
|
||||
doc-search-dirs
|
||||
dll-dir
|
||||
lib-dir
|
||||
lib-search-dirs
|
||||
include-dir
|
||||
include-search-dirs
|
||||
bin-dir
|
||||
man-dir))
|
||||
(define-for-syntax string-exports
|
||||
'(cgc-suffix
|
||||
3m-suffix))
|
||||
(define-for-syntax flag-exports
|
||||
'(absolute-installation?))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; For configure into into absolute paths
|
||||
|
||||
(define use-default (delay #f))
|
||||
|
||||
(define (to-path l)
|
||||
(cond [(string? l) (complete-path (string->path l))]
|
||||
[(bytes? l) (complete-path (bytes->path l))]
|
||||
[(list? l) (map to-path l)]
|
||||
[else l]))
|
||||
|
||||
(define (complete-path p)
|
||||
(cond [(complete-path? p) p]
|
||||
[(absolute-path? p) (exe-relative p)]
|
||||
[else
|
||||
(or (parameterize ([current-directory (find-system-path 'orig-dir)])
|
||||
(find-executable-path (find-system-path 'exec-file) p))
|
||||
(exe-relative p))]))
|
||||
|
||||
(define (exe-relative p)
|
||||
(let ([exec (path->complete-path
|
||||
(find-executable-path (find-system-path 'exec-file))
|
||||
(find-system-path 'orig-dir))])
|
||||
(let-values ([(base name dir?) (split-path exec)])
|
||||
(path->complete-path p base))))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; module-begin
|
||||
|
||||
(define-syntax config-module-begin
|
||||
(lambda (stx)
|
||||
(syntax-case stx (define define-values)
|
||||
[(_ (define-values (name) val))
|
||||
;; This can happen because a lone definition is expanded
|
||||
#'(config-module-begin (define name val))]
|
||||
[(_ (define name val) ...)
|
||||
(let ([names (syntax->list #'(name ...))])
|
||||
(unless (andmap identifier? names)
|
||||
(raise-syntax-error #f "bad syntax" stx))
|
||||
(for-each (lambda (name)
|
||||
(unless (or (memq (syntax-e name) path-exports)
|
||||
(memq (syntax-e name) string-exports)
|
||||
(memq (syntax-e name) flag-exports))
|
||||
(raise-syntax-error #f "not a config name" name)))
|
||||
names)
|
||||
(let ([syms (map syntax-e names)])
|
||||
(let loop ([names names][syms syms])
|
||||
(cond [(null? names) 'done]
|
||||
[(memq (car syms) (cdr syms))
|
||||
(raise-syntax-error #f "duplicate definition" (car names))]
|
||||
[else (loop (cdr names) (cdr syms))]))
|
||||
(with-syntax ([(expr ...)
|
||||
(map (lambda (name val)
|
||||
(cond
|
||||
[(memq (syntax-e name) path-exports)
|
||||
#`(delay (to-path #,val))]
|
||||
[(memq (syntax-e name) string-exports)
|
||||
#`(delay #,val)]
|
||||
[else val]))
|
||||
(syntax->list #'(name ...))
|
||||
(syntax->list #'(val ...)))])
|
||||
(define ((mkdef v) id)
|
||||
(if (memq id syms)
|
||||
'()
|
||||
(list #`(define #,(datum->syntax stx id stx) (thwart-inline #,v)))))
|
||||
(syntax-property
|
||||
#`(#%plain-module-begin
|
||||
(provide #,@path-exports #,@string-exports #,@flag-exports)
|
||||
(define name expr) ...
|
||||
#,@(apply append (map (mkdef #'use-default) path-exports))
|
||||
#,@(apply append (map (mkdef #'use-default) string-exports))
|
||||
#,@(apply append (map (mkdef #'#f) flag-exports)))
|
||||
'certify-mode 'transparent))))])))
|
||||
|
||||
;; Hack: we want to be able to replace "config.rkt" and recompile it
|
||||
;; in-place, without recompiling bytecode that may depend on it.
|
||||
;; To enable that, ensure that the exports of a configuration are
|
||||
;; not inlined.
|
||||
(define thwart-inline #f)
|
||||
(set! thwart-inline (lambda (v) v))
|
|
@ -1,8 +0,0 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define tools (list '("tool.rkt")))
|
||||
(define tool-names (list "Slideshow"))
|
||||
(define tool-icons (list (list "slideshow.png" "slideshow")))
|
||||
(define mred-launcher-libraries (list "start.rkt"))
|
||||
(define mred-launcher-names (list "Slideshow"))
|
||||
(define compile-omit-paths '("initial-ones.rkt" "pict-snipclass.rkt" "examples"))
|
|
@ -1,3 +0,0 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define name "Calltrace")
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -1,5 +1,8 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define single-collection "algol60")
|
||||
(define build-deps '("drracket"))
|
||||
|
||||
(define tools '(("tool.rkt")))
|
||||
(define tool-names '("Algol 60"))
|
||||
(define scribblings '(("algol60.scrbl" () (experimental 40))))
|
3
pkgs/contract-profile/info.rkt
Normal file
3
pkgs/contract-profile/info.rkt
Normal file
|
@ -0,0 +1,3 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define single-collection "contract-profile")
|
|
@ -1,5 +1,7 @@
|
|||
#lang setup/infotab
|
||||
|
||||
(define single-collection "datalog")
|
||||
|
||||
(define scribblings '(["scribblings/datalog.scrbl" (multi-page) (language)]))
|
||||
|
||||
(define compile-omit-paths '("tests"))
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user