[racket-dev] advice on the 6.x build system.

From: David Bremner (david at tethera.net)
Date: Thu Oct 16 17:23:37 EDT 2014

I've been been trying to rework the debian racket packaging, and to
understand the new racket build system.  I need to have the two seperate
targets, which most of the package installation is done in the the
"build-indep-stamp" target.

The following makefile snippet is _almost_ working, except that I'm
missing a launcher for drracket. After installing debian/tmp, running
/usr/lib/racket/gracket and (require drracket) seems to work ok to start
drracket, so I take that as indicating most of the packages / collects
are in the right place.  Can anyone see what I'm doing wrong here?

I should say that I tried to make better use of the top level makefile,
but I ended up with wrong default collects paths (probably just a
different error on my part).

I tried all of this (most recently) with the current release branch
(c326c21b73356e)

destdir:=$(CURDIR)/debian/tmp
base_build_dir:=$(CURDIR)/racket/src/build
PRERACKET:=${destdir}/usr/bin/racket  -X ${destdir}/usr/share/racket/collects

raco_args:=--catalog build/local/catalog --auto -i --skip-installed


${base_build_dir}/Makefile: 
	mkdir -p ${base_build_dir}
	cd ${base_build_dir} && $(CURDIR)/racket/src/configure --prefix=/usr

build-arch-stamp: ${base_build_dir}/Makefile
	$(MAKE) -C ${base_build_dir} 
	$(MAKE) -C ${base_build_dir} DESTDIR=${destdir} install
	touch $@

build-indep-stamp: build-arch-stamp
	$(MAKE) RACKET="${PRERACKET}" \
		local-source-catalog 
	${PRERACKET} -N raco -l- \
		pkg install ${raco_args}  main-distribution racket-lib
	touch $@

Posted on the dev mailing list.