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.
 .
 axiom (20170501-14) unstable; urgency=medium
 .
   * support gcl27
Author: Camm Maguire <camm@debian.org>

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

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2025-02-10

--- axiom-20170501.orig/books/bookvol10.pamphlet
+++ axiom-20170501/books/bookvol10.pamphlet
@@ -16952,7 +16952,7 @@ Next layer depends on: GUESS
 
 LAYER20=\
   ${OUT}/GUESS.o ${OUT}/INFCLSPT.o 
-    
+
 \end{chunk}
 \begin{chunk}{layerpic}
 /* layer 20 */
@@ -17255,14 +17255,12 @@ CLIQUE1FILES = ${OUT}/MYUP.o  ${OUT}/MYE
 
 ${OUT}/MYEXPR.o: ${OUT}/MYUP.o
 
-${MID}/clique1.spad: ${IN}/MYUP.spad ${IN}/MYEXPR.spad
-	@ (cd ${MID} ; \
-	   cat ${IN}/MYUP.spad >clique1.spad ; \
-	   cat ${IN}/MYEXPR.spad >>clique1.spad ; )
+${MID}/clique1.spad: MYUP.spad MYEXPR.spad
+	@echo sa01 making $@ from $^
+	@ (cat $^ >$@ )
 
 ${CLIQUE1FILES}: ${MID}/clique1.spad
-	@echo sa01 making ${OUT}/MYUP.o from ${MID}/clique1.spad
-	@echo sa02 making ${OUT}/MYEXPR.o from ${MID}/clique1.spad
+	@echo sa02 making $@ from $^
 	@ (cd ${MID} ; \
 	   if [ -z "${NOISE}" ] ; then \
 	    echo ")co clique1.spad" | ${INTERPSYS}  ; \
@@ -17271,7 +17269,7 @@ ${CLIQUE1FILES}: ${MID}/clique1.spad
 	   fi )
 	@ cp ${MID}/MYUP.nrlib/code.o ${OUT}/MYUP.o
 	@ cp ${MID}/MYEXPR.nrlib/code.o ${OUT}/MYEXPR.o
-	
+
 \end{chunk}
 Here we have the general case where two files are co-dependent, that is,
 PAFF and PAFFFF both have to be compiled together. They also have a set
@@ -17285,18 +17283,13 @@ CLIQUE2DEPS  = BLMETCT GPAFF PFORP PACOF
 
 ${OUT}/PAFFFF.o: ${OUT}/PAFF.o 
 
-$(MID)/clique2.spad: ${IN}/PAFF.spad ${IN}/PAFFFF.spad
-	@echo sa03a making ${MID}/clique2.spad from ${IN}/PAFF.spad ${IN}/PAFFFF.spad
-	@ (cd ${MID} ; \
-	   cat ${IN}/PAFF.spad >clique2.spad ; \
-	   cat ${IN}/PAFFFF.spad >>clique2.spad ; )
+$(MID)/clique2.spad: PAFF.spad PAFFFF.spad
+	@echo sa03a making $@ from $^
+	@ (cat $^ > $@ )
 
 $(CLIQUE2FILES): $(MID)/clique2.spad
-	@echo sa03 making ${OUT}/PAFF.o from ${MID}/clique2.spad
-	@echo sa04 making ${OUT}/PAFFFF.o from ${MID}/clique2.spad
+	@echo sa03 making $@ from $^
 	@ (cd ${MID} ; \
-	   cat ${IN}/PAFF.spad >clique2.spad ; \
-	   cat ${IN}/PAFFFF.spad >>clique2.spad ; \
 	   if [ -z "${NOISE}" ] ; then \
 	    echo -e ")lib ${CLIQUE2DEPS} \n )co clique2.spad" \
               | ${INTERPSYS} ; \
@@ -17307,7 +17300,7 @@ $(CLIQUE2FILES): $(MID)/clique2.spad
 	   fi )
 	@ cp ${MID}/PAFF.nrlib/code.o ${OUT}/PAFF.o
 	@ cp ${MID}/PAFFFF.nrlib/code.o ${OUT}/PAFFFF.o
-	
+
 \end{chunk}
 \begin{chunk}{ignore}
 EXPRDEPS  = LF
@@ -17532,16 +17525,20 @@ ${OUT}/%.o: ${MID}/%.nrlib/code.o
 \begin{chunk}{genericnrlibfiles}
 
 .PRECIOUS: ${MID}/%.nrlib/code.o
-${MID}/%.nrlib/code.o: ${MID}/%.spad
-	@ echo sa07 compiling $*.spad to $*.nrlib
+${MID}/%.nrlib/code.o: %.spad
+	@ echo sa07 compiling $^ $@
 	@ if [ -z "${NOISE}" ] ; then \
 	   (cd ${MID} ; \
-	    echo ")co $*.spad" | ${INTERPSYS} ) ; \
+	    echo ")co $<" | ${INTERPSYS} ) ; \
            else \
 	   (cd ${MID} ; \
-	     echo ")co $*.spad" | ${INTERPSYS} ) 1>/dev/null 2>/dev/null ; \
+	     echo ")co $<" | ${INTERPSYS} ) 1>/dev/null 2>/dev/null ; \
 	   fi 
 
+${MID}/%-.nrlib/code.o: ${MID}/%.nrlib/code.o
+	@ [ -e $@ ] || exit 1
+	@ touch $@
+
 \end{chunk}
 \begin{chunk}{genericBOOTSTRAPfiles}
 
@@ -17659,36 +17656,40 @@ Step 2 is an awk command line.
 grep -E 'begin{chunk}{category\ .*}' ${BOOKS}/bookvol10.2.pamphlet | sort | uniq | awk -F: '{
   chunk=substr($1,15,length($1)-15);
   split(chunk,part," ");
-  spadfile="${MID}/"part[2]".spad";
+  spadfile=""part[2]".spad";
   print spadfile": ${BOOKS}/bookvol10.2.pamphlet";
-  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.2.pamphlet\" \""chunk"\" \""part[2]".spad\")\x27 | ${LISPTANGLE} ";
+  print "	   @echo sa000 extracting $@ from $^";
+  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.2.pamphlet\" \""chunk"\" \"$@\")\x27 | ${LISPTANGLE} >/dev/null 2>&1";
   print "";
 }'
 
 grep -E 'begin{chunk}{domain\ .*}' ${BOOKS}/bookvol10.3.pamphlet | sort | uniq | awk -F: '{
   chunk=substr($1,15,length($1)-15);
   split(chunk,part," ");
-  spadfile="${MID}/"part[2]".spad";
+  spadfile=""part[2]".spad";
   print spadfile": ${BOOKS}/bookvol10.3.pamphlet";
-  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.3.pamphlet\" \""chunk"\" \""part[2]".spad\")\x27 | ${LISPTANGLE} ";
+  print "	   @echo sa000 extracting $@ from $^";
+  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.3.pamphlet\" \""chunk"\" \"$@\")\x27 | ${LISPTANGLE} >/dev/null 2>&1";
   print "";
 }'
 
 grep -E 'begin{chunk}{package\ .*}' ${BOOKS}/bookvol10.4.pamphlet | sort | uniq | awk -F: '{
   chunk=substr($1,15,length($1)-15);
   split(chunk,part," ");
-  spadfile="${MID}/"part[2]".spad";
+  spadfile=""part[2]".spad";
   print spadfile": ${BOOKS}/bookvol10.4.pamphlet";
-  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.4.pamphlet\" \""chunk"\" \""part[2]".spad\")\x27 | ${LISPTANGLE} ";
+  print "	   @echo sa000 extracting $@ from $^";
+  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.4.pamphlet\" \""chunk"\" \"$@\")\x27 | ${LISPTANGLE} >/dev/null 2>&1";
   print "";
 }'
 
 grep -E 'begin{chunk}{package\ .*}' ${BOOKS}/bookvol10.5.pamphlet | sort | uniq | awk -F: '{
   chunk=substr($1,15,length($1)-15);
   split(chunk,part," ");
-  spadfile="${MID}/"part[2]".spad";
+  spadfile=""part[2]".spad";
   print spadfile": ${BOOKS}/bookvol10.5.pamphlet";
-  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.5.pamphlet\" \""chunk"\" \""part[2]".spad\")\x27 | ${LISPTANGLE} ";
+  print "	   @echo sa000 extracting $@ from $^";
+  print "	   @echo \x27(tangle \"${BOOKS}/bookvol10.5.pamphlet\" \""chunk"\" \"$@\")\x27 | ${LISPTANGLE} >/dev/null 2>&1";
   print "";
 }'
 
@@ -19215,6 +19216,7 @@ fasthelp:
 	@ echo =========================================
 	@echo sa17 making .help files with lisp
 	@ echo "(makeHelpFiles)" | ${LISP}
+	@ touch $@
 
 fastinput:
 	@ echo ==========================================
@@ -19222,6 +19224,7 @@ fastinput:
 	@ echo ==========================================
 	@echo sa18 making .input files with lisp
 	@ echo "(makeInputFiles)" | ${LISP}
+	@ touch $@
 
 fastxhtml:
 	@ echo ==========================================
@@ -19230,8 +19233,9 @@ fastxhtml:
 	@echo sa19 making .xhtml files with lisp
 	@ mkdir -p ${MNT}/doc
 	@ echo "(makeXHTMLFiles)" | ${LISP}
+	@ touch $@
 
-copyspad:
+copyspad: src
 	@ echo ==========================================
 	@ echo src/algebra COPYING SPAD FILES TO ${OUTSPAD}
 	@ echo ==========================================
@@ -19261,7 +19265,7 @@ everything: lib db cmd gloss
 	@ echo SPAD= ${SPAD} SRC= ${SRC} INT= ${INT}
 	@ echo OBJ= ${OBJ} MNT= ${MNT} O=${O} LISP=${LISP} BYE=${BYE}
 
-src:	announce ${ORDER}
+src:	announce layer24done
 	@ echo sa23 Finished uilding nrlibS from spad sources
 
 announce:
@@ -19275,6 +19279,7 @@ announce:
 \getchunk{stages}
 
 clean:
+	@rm -f fasthelp fastinput fasthtml
 	@echo sa24 src/algebra cleaned
 
 \end{chunk}
