# 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 = : # RUN_RACKET_ typically redirects to RUN_THIS_RACKET_, # but it can also redirect to an existing Racket executable # that is the same as the version being built (which is # useful for cross-compilation, for example). RUN_THIS_RACKET_CGC = racket/racket@CGC@ RUN_THIS_RACKET_MMM = racket/racket@MMM@ RUN_THIS_RACKET_MAIN_VARIANT = racket/racket@MAIN_VARIANT@ 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 gracket-3m: cd gracket; $(MAKE) 3m no-3m: $(NOOP) cgc: cd racket; $(MAKE) cgc $(MAKE) @MAKE_GRACKET@-cgc gracket-cgc: cd gracket; $(MAKE) cgc no-cgc: $(NOOP) both: $(MAKE) cgc $(MAKE) 3m # Install (common) ---------------------------------------- SETUP_ARGS = -X @DIRCVTPRE@"$(DESTDIR)$(collectsdir)"@DIRCVTPOST@ -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 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) @RUN_RACKET_CGC@ -c "$(srcdir)/get-libs.rkt" core @DIRCVTPRE@"$(DESTDIR)$(libpltdir)"@DIRCVTPOST@ @RUN_RACKET_CGC@ -c "$(srcdir)/get-libs.rkt" math @DIRCVTPRE@"$(DESTDIR)$(libpltdir)"@DIRCVTPOST@ @RUN_RACKET_CGC@ -c "$(srcdir)/get-libs.rkt" db @DIRCVTPRE@"$(DESTDIR)$(libpltdir)"@DIRCVTPOST@ @RUN_RACKET_CGC@ -c "$(srcdir)/get-libs.rkt" com @DIRCVTPRE@"$(DESTDIR)$(libpltdir)"@DIRCVTPOST@ install-common-middle: $(MAKE) @MAKE_COPYTREE@-run $(MAKE) install-@MAKE_GRACKET@-post-collects $(MAKE) lib-finish install-common-last: $(MAKE) fix-paths $(MAKE) @MAKE_INSTALL_PKGSCOPE@-raco-pkg-default-scope install-no: $(NOOP) lib-finish: if [ "$(DESTDIR)" = "" ]; then \ @LIBFINISH@ "$(libdir)"; \ fi no-run: $(NOOP) copytree-run: @RUN_RACKET_CGC@ -u \ "$(srcdir)/../collects/setup/unixstyle-install.rkt" \ make-install-copytree "$(srcdir)/.." \ $(ALLDIRINFO) "@INSTALL_ORIG_TREE@" adjust-raco-pkg-default-scope: @RUN_RACKET_CGC@ -l raco pkg config -i --set default-scope @INSTALL_PKGSCOPE@ preserve-raco-pkg-default-scope: $(NOOP) install-gracket-post-collects: cd gracket; $(MAKE) install-post-collects install-no-post-collects: $(NOOP) fix-paths: if [ "$(DESTDIR)" != "" ]; then \ @RUN_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) @RUN_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) @RUN_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) @RUN_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 # Docs install ---------------------------------------- # The "install" target already does this, but it does tons more too. install-html: $(MAKE) install PLT_SETUP_OPTIONS="-nxiId $(PLT_SETUP_OPTIONS)" install-pdf: $(MAKE) install PLT_SETUP_OPTIONS="-nxiId --doc-pdf $(docdir)/pdf $(PLT_SETUP_OPTIONS)" # Clean ---------------------------------------- clean: cd racket; $(MAKE) clean if [ -d gracket ]; then cd gracket; $(MAKE) clean; fi