201 lines
4.1 KiB
Makefile
201 lines
4.1 KiB
Makefile
|
|
# Builds Racket and GRacket (if enabled), and
|
|
# drives the main install
|
|
|
|
srcdir = @srcdir@
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
bindir = @bindir@
|
|
libdir = @libdir@
|
|
includepltdir = @includepltdir@
|
|
libpltdir = @libpltdir@
|
|
collectsdir = @collectsdir@
|
|
datarootdir = @datarootdir@
|
|
mandir = @mandir@
|
|
docdir = @docdir@
|
|
builddir = @builddir@
|
|
|
|
NOOP = :
|
|
|
|
ALLDIRINFO = "$(DESTDIR)$(bindir)" \
|
|
"$(DESTDIR)$(collectsdir)" \
|
|
"$(DESTDIR)$(docdir)" \
|
|
"$(DESTDIR)$(libdir)" \
|
|
"$(DESTDIR)$(includepltdir)" \
|
|
"$(DESTDIR)$(libpltdir)" \
|
|
"$(DESTDIR)$(mandir)"
|
|
|
|
all:
|
|
$(MAKE) @MAIN_VARIANT@
|
|
|
|
3m:
|
|
cd racket; $(MAKE) 3m
|
|
$(MAKE) @MAKE_GRACKET@-3m
|
|
$(MAKE) @MAKE_PLOT@-3m
|
|
|
|
gracket-3m:
|
|
cd gracket; $(MAKE) 3m
|
|
|
|
plot-3m:
|
|
cd plot; $(MAKE) 3m
|
|
|
|
no-3m:
|
|
$(NOOP)
|
|
|
|
cgc:
|
|
cd racket; $(MAKE) cgc
|
|
$(MAKE) @MAKE_GRACKET@-cgc
|
|
$(MAKE) @MAKE_PLOT@-cgc
|
|
|
|
gracket-cgc:
|
|
cd gracket; $(MAKE) cgc
|
|
|
|
plot-cgc:
|
|
cd plot; $(MAKE) cgc
|
|
|
|
no-cgc:
|
|
$(NOOP)
|
|
|
|
both:
|
|
$(MAKE) cgc
|
|
$(MAKE) 3m
|
|
|
|
# Install (common) ----------------------------------------
|
|
|
|
SETUP_ARGS = -X "$(DESTDIR)$(collectsdir)" -N "raco setup" -l- setup $(PLT_SETUP_OPTIONS) $(PLT_ISO) @INSTALL_SETUP_FLAGS@
|
|
|
|
# Pass compile and link flags to `make install' for use by any
|
|
# collection-setup actions (currently in "plot") that compile
|
|
# and link C code:
|
|
CFLAGS = @CFLAGS@ @COMPFLAGS@ @PREFLAGS@
|
|
LDFLAGS = @LDFLAGS@
|
|
WITH_ENV_VARS = env CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
|
|
|
|
install:
|
|
$(MAKE) install-@MAIN_VARIANT@
|
|
|
|
plain-install:
|
|
if [ "$(DESTDIR)" != "" ]; then \
|
|
echo "cannot use plain-install with DESTDIR=$(DESTDIR)"; exit 1; \
|
|
fi
|
|
$(MAKE) plain-install-@MAIN_VARIANT@
|
|
|
|
install-common-first:
|
|
mkdir -p $(ALLDIRINFO)
|
|
|
|
install-common-middle:
|
|
$(MAKE) install-@MAKE_PLOT@
|
|
$(MAKE) @MAKE_COPYTREE@-run
|
|
$(MAKE) install-@MAKE_GRACKET@-post-collects
|
|
$(MAKE) lib-finish
|
|
|
|
install-common-last:
|
|
$(MAKE) fix-paths
|
|
|
|
install-plot:
|
|
cd plot; $(MAKE) install
|
|
|
|
install-no:
|
|
$(NOOP)
|
|
|
|
lib-finish:
|
|
@LIBFINISH@ "$(libdir)"
|
|
|
|
no-run:
|
|
$(NOOP)
|
|
|
|
copytree-run:
|
|
racket/racket@CGC@ -u \
|
|
"$(srcdir)/../collects/setup/unixstyle-install.rkt" \
|
|
make-install-copytree "$(srcdir)/.." \
|
|
$(ALLDIRINFO) "@INSTALL_ORIG_TREE@"
|
|
|
|
install-gracket-post-collects:
|
|
cd gracket; $(MAKE) install-post-collects
|
|
|
|
install-no-post-collects:
|
|
$(NOOP)
|
|
|
|
fix-paths:
|
|
if [ "$(DESTDIR)" != "" ]; then \
|
|
racket/racket@CGC@ -u \
|
|
"$(srcdir)/../collects/setup/unixstyle-install.rkt" \
|
|
make-install-destdir-fix "$(srcdir)/.." \
|
|
$(ALLDIRINFO) "@INSTALL_ORIG_TREE@"; \
|
|
fi
|
|
|
|
# 3m install ----------------------------------------
|
|
|
|
install-3m-common:
|
|
$(MAKE) install-common-first
|
|
cd racket; $(MAKE) install-3m
|
|
$(MAKE) install-@MAKE_GRACKET@-3m
|
|
$(MAKE) install-common-middle
|
|
|
|
install-3m:
|
|
$(MAKE) install-3m-common
|
|
$(WITH_ENV_VARS) racket/racket@MMM@ $(SETUP_ARGS)
|
|
$(MAKE) install-common-last
|
|
|
|
plain-install-3m:
|
|
$(MAKE) install-3m-common
|
|
$(MAKE) install-common-last
|
|
|
|
install-no-3m:
|
|
$(NOOP)
|
|
|
|
install-gracket-3m:
|
|
cd gracket; $(MAKE) install-3m
|
|
|
|
# CGC install ----------------------------------------
|
|
|
|
install-cgc-common:
|
|
$(MAKE) install-common-first
|
|
cd racket; $(MAKE) install-cgc
|
|
$(MAKE) install-@MAKE_GRACKET@-cgc
|
|
$(MAKE) install-common-middle
|
|
|
|
install-cgc:
|
|
$(MAKE) install-cgc-common
|
|
$(WITH_ENV_VARS) racket/racket@CGC@ $(SETUP_ARGS)
|
|
$(MAKE) install-common-last
|
|
|
|
plain-install-cgc:
|
|
$(MAKE) install-cgc-common
|
|
$(MAKE) install-common-last
|
|
|
|
install-no-cgc:
|
|
$(NOOP)
|
|
|
|
install-gracket-cgc:
|
|
cd gracket; $(MAKE) install-cgc
|
|
|
|
# Both install ----------------------------------------
|
|
|
|
install-both-common:
|
|
$(MAKE) install-common-first
|
|
cd racket; $(MAKE) install-both
|
|
$(MAKE) install-@MAKE_GRACKET@-both
|
|
$(MAKE) install-common-middle
|
|
|
|
install-both:
|
|
$(MAKE) install-both-common
|
|
$(WITH_ENV_VARS) racket/racket@MAIN_VARIANT@ $(SETUP_ARGS)
|
|
$(MAKE) install-common-last
|
|
|
|
plain-install-both:
|
|
$(MAKE) install-both-common
|
|
$(MAKE) install-common-last
|
|
|
|
install-no-both:
|
|
$(NOOP)
|
|
|
|
install-gracket-both:
|
|
cd gracket; $(MAKE) install-both
|
|
|
|
# Clean ----------------------------------------
|
|
|
|
clean:
|
|
cd racket; $(MAKE) clean
|
|
if [ -d gracket ]; then cd gracket; $(MAKE) clean; fi
|