Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 scheme2c (2011.07.26-3) unstable; urgency=low
 .
   * single debian patch source option (closes: #643271)
   * tiny upstream documentation tweaks
Author: Barak A. Pearlmutter <bap@debian.org>
Bug-Debian: http://bugs.debian.org/643271

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- scheme2c-2011.07.26.orig/CHANGES
+++ scheme2c-2011.07.26/CHANGES
@@ -64,7 +64,7 @@ Compiler changes since the 01nov91jfb re
 	  (set! bar 4) )
 
     containging let's whose only purpose is to introduce a new lexical scope
-    are now correctly compiled when the appear at the top level.
+    are now correctly compiled when they appear at the top level.
 
 7.  Lambda expressions containing arguments that are not symbols now result
     in an error message rather than a compiler error.
--- scheme2c-2011.07.26.orig/README
+++ scheme2c-2011.07.26/README
@@ -170,7 +170,7 @@ running ULTRIX.
     such as ~/bin:
 
 	8 >cd ..
-	9 >make "DESTDIR = /udir/`whoami`/bin" install-private
+	9 >make prefix=$HOME/s2c BINDIR=. LIBDIR=. LIBSUBDIR=. install
 	10 >rehash
 
     Given that this directory in the current search path, the compiler can
--- scheme2c-2011.07.26.orig/scrt/makefile
+++ scheme2c-2011.07.26/scrt/makefile
@@ -41,7 +41,7 @@ INSTALL_SCRIPT = ${INSTALL}
 .SUFFIXES:
 .SUFFIXES:	.o .c .sc .s
 
-SCC = ../scsc/s2cc
+SCC = ../scsc/Xs2cc
 SCCFLAGS = 
 
 SRCDIR = ../../scrt
@@ -111,24 +111,20 @@ Xmv:		Xs2ci Xlibs2c.a
 	mv Xlibs2c.a libs2c.a
 
 port:
-	$(MAKE) "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = echo" \
+	$(MAKE) "CC=${CC}" "CFLAGS=${CFLAGS}" "SCC=echo" \
 	     Xlibs2c.a Xs2ci Xmv ${Plib}
 
 libs2c_p.a:	libs2c.a
 	mkdir -p saveobj
 	mv ${Sruntime} ${Cruntime} ${Aruntime} saveobj/
 	rm -f libs2c_p.a
-	$(MAKE) "CC = ${CC}" "CFLAGS = ${CFLAGS} -pg" ${Sruntime} ${Cruntime} \
+	$(MAKE) "CC=${CC}" "CFLAGS=${CFLAGS} -pg" ${Sruntime} ${Cruntime} \
 	     ${Aruntime}
 	ar q libs2c_p.a ${Cruntime} ${Sruntime} ${Aruntime}
 	${RANLIB} libs2c_p.a
 	mv saveobj/* ./
 	rmdir saveobj
 
-install-private:
-	$(MAKE) "DESTDIR=${DESTDIR}" "LIBDIR=/." "BINDIR=/. LIBSUBDIR=." \
-	     "OWNER = -o `whoami`" install
-
 install:
 	${INSTALL} -d ${DESTDIR}${LIBDIR}/${LIBSUBDIR}
 	${INSTALL_DATA} libs2c.a ${DESTDIR}${LIBDIR}/${LIBSUBDIR}/
@@ -160,8 +156,8 @@ bindist:
 	      libs2c.a ${Plib} s2ci ${destdir}
 
 all:
-	$(MAKE) "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = ${SCC}" \
-	     "SCCFLAGS = ${SCCFLAGS}" Xlibs2c.a Xs2ci Xmv ${Plib}
+	$(MAKE) "CC=${CC}" "CFLAGS=${CFLAGS}" "SCC=${SCC}" \
+	     "SCCFLAGS=${SCCFLAGS}" Xlibs2c.a Xs2ci Xmv ${Plib}
 
 srclinks:
 	for x in ${Cruntimec} ${Chfiles} ${Sruntimec} ${Sruntimesc} ${Smisc}; \
--- scheme2c-2011.07.26.orig/xlib/makefile
+++ scheme2c-2011.07.26/xlib/makefile
@@ -17,7 +17,7 @@ CDECL = ../cdecl/s2cdecl
 SIZEOF = ../cdecl/s2csizeof
 SCH = ../cdecl/s2ch
 SRCDIR = ../../xlib
-SCC = ../scsc/s2cc
+SCC = ../scsc/Xs2cc
 SCXLIB = libs2cxl.a
 
 XD = X.cdecl Xatom.cdecl Xlib.cdecl Xresource.cdecl Xutil.cdecl \
--- scheme2c-2011.07.26.orig/doc/s2cc.l
+++ scheme2c-2011.07.26/doc/s2cc.l
@@ -149,7 +149,7 @@ error file.
 .br
 /.../libs2c_p.a	profiled library (optional)
 .br
-/.../s2cc	c-shell script
+/.../s2cc	shell script
 .br
 /.../s2ccomp	compiler
 .br
--- scheme2c-2011.07.26.orig/scsc/makefile
+++ scheme2c-2011.07.26/scsc/makefile
@@ -81,24 +81,29 @@ sc-to-c:	${scc}
 Xs2ccomp:	${scc} ${sco} ${RT}
 	${CC} -o Xs2ccomp ${CFLAGS} ${sco} ${RT} -lm ${LDFLAGS}
 
-Xmv:
-	mv Xs2ccomp s2ccomp
+s2ccomp: Xs2ccomp
+	cp -a Xs2ccomp s2ccomp
 
 port:
-	$(MAKE) "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = echo"  Xs2ccomp
-	$(MAKE) "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = echo"  Xmv
+	$(MAKE) "CC=${CC}" "CFLAGS=${CFLAGS}" "SCC=echo" Xs2ccomp s2ccomp
 
 s2cc:
-	echo '#! /bin/sh' \
-	 > $*
-	echo '${LIBDIR}/${LIBSUBDIR}/s2ccomp -scl ${SCL} -scmh ${SCMH} \
-	     -cc ${CC} -LIBDIR ${LIBDIR}/${LIBSUBDIR} $$*' \
-	 >> $*
-	chmod +x $*
+	echo '#! /bin/sh' > $@
+	echo ${LIBDIR}/${LIBSUBDIR}/s2ccomp -scl ${SCL} -scmh ${SCMH} \
+	     -cc ${CC} -LIBDIR ${LIBDIR}/${LIBSUBDIR} '$$*' >> $@
+	chmod +x $@
+
+Xs2cc:
+	echo '#! /bin/sh' > $@
+	echo $$(pwd)/s2ccomp -scl ${SCL} -scmh ${SCMH} \
+	     -cc ${CC} -LIBDIR $$(pwd)/${RTDIR} '$$*' >> $@
+	chmod +x $@
+
+all: s2cc s2ccomp
 
 install: s2cc # s2ccomp
 	${INSTALL} -d ${DESTDIR}${BINDIR}
-	${INSTALL_SCRIPT} s2cc ${DESTDIR}${BINDIR}
+	${INSTALL_SCRIPT} s2cc ${DESTDIR}${BINDIR}/
 	ln -sf s2cc ${DESTDIR}${BINDIR}/scc
 	${INSTALL} -d ${DESTDIR}${LIBDIR}/${LIBSUBDIR}
 	${INSTALL_PROGRAM} s2ccomp ${DESTDIR}${LIBDIR}/${LIBSUBDIR}/
@@ -112,19 +117,7 @@ clean-sc-to-c:
 noprogs:
 	rm -f s2ccomp Xs2ccomp
 
-all: s2cc
-	$(MAKE) "SCC = ${SCC}" "RTDIR = ${RTDIR}" "CFLAGS = ${CFLAGS}" \
-		Xs2ccomp Xmv
-
-srclinks:
+srclinks: s2cc Xs2cc
 	for x in ${scsc} ${scc} ${scsch}; \
 	    do ln -s ${SRCDIR}/$$x $$x;\
 	done
-	echo '#! /bin/sh' > s2cc
-	echo `pwd`'/s2ccomp -scl ${SCL} -scmh ${SCMH} \
-	     -cc ${CC} -LIBDIR ' `pwd`'/${RTDIR} $$*' >> s2cc
-	chmod +x s2cc
-	echo '#! /bin/sh' > Xs2cc
-	echo `pwd`'/Xs2ccomp -scl ${SCL} -scmh ${SCMH} \
-	     -cc ${CC} -LIBDIR ' `pwd`'/${RTDIR} $$*' >> Xs2cc
-	chmod +x Xs2cc
--- scheme2c-2011.07.26.orig/cdecl/makefile
+++ scheme2c-2011.07.26/cdecl/makefile
@@ -19,7 +19,7 @@ MISC = sizeof.c sch.sc README document l
 
 SRCDIR = ../../cdecl
 
-SCC = ../scsc/s2cc
+SCC = ../scsc/Xs2cc
 
 .sc.c:
 	${SCC} -C $*.sc
--- scheme2c-2011.07.26.orig/test/makefile
+++ scheme2c-2011.07.26/test/makefile
@@ -2,7 +2,7 @@
 #  Scheme->C compiler and runtime tests.
 #
 
-SCC = ../scsc/s2cc
+SCC = ../scsc/Xs2cc
 SCCFLAGS = -g
 
 n = n must be defined
@@ -91,9 +91,9 @@ noprogs:
 	rm -f ${progs}
 
 all:
-	$(MAKE) "SCC = ${SCC}" "SCCFLAGS = ${SCCFLAGS}" \
+	$(MAKE) "SCC=${SCC}" "SCCFLAGS=${SCCFLAGS}" \
 	     test test50 test51 test52 test54
-	$(MAKE) "SCC = ${SCC}" "SCCFLAGS = ${SCCFLAGS}" "n = 53" testn
+	$(MAKE) "SCC=${SCC}" "SCCFLAGS=${SCCFLAGS}" "n=53" testn
 
 alltests.sc: ${alltests}
 	cat ${alltests} > alltests.sc
@@ -103,5 +103,13 @@ srclinks:
 	    do ln -s ${SRCDIR}/$$x $$x;\
 	done
 
-autotest: test test50 test54
-	./test && ./test50 && ./test54
+autotest: autotest-test autotest-test50 autotest-test54
+
+autotest-test: test
+	./test
+autotest-test50: test50
+	./test50
+autotest-test54: test54
+	./test54
+
+.PHONY: autotest-test autotest-test50 autotest-test54
