--- ./src/algebra/Makefile.pamphlet.orig	2010-07-24 21:15:28.000000000 +0000
+++ ./src/algebra/Makefile.pamphlet	2010-07-25 15:09:57.000000000 +0000
@@ -16815,7 +16815,7 @@
 	  else \
 	   echo '(progn (in-package (quote boot)) (compile-file "$*.lsp" :output-file "$*.o"))' | ${DEPSYS} >${TMP}/trace ; \
 	  fi )
-	@ cp ${MID}/$*.o ${OUT}/$*.o
+	@ mkdir -p $$(dirname $(OUT)/$*.o) && cp ${MID}/$*.o ${OUT}/$*.o
 
 @
 <<genericSPADfiles>>=
--- ./src/input/monitortest.input.pamphlet.orig	2010-07-24 21:15:29.000000000 +0000
+++ ./src/input/monitortest.input.pamphlet	2010-07-25 15:09:57.000000000 +0000
@@ -353,10 +353,11 @@
 --RValue = (NIL NIL NIL NIL)
 --E 26
 
+\begin{chunk}{*}
 )spool 
 )lisp (bye)
  
-\end{chunk}
+\end{chunk}{*}
 \eject
 \begin{thebibliography}{99}
 \bibitem{1} nothing
--- ./src/lib/pixmap.c.pamphlet.orig	2010-09-25 05:29:00.000000000 +0000
+++ ./src/lib/pixmap.c.pamphlet	2010-09-28 14:54:03.000000000 +0000
@@ -81,7 +81,7 @@
 /* returns true if the file exists */
 
 int
-file_exists(char *file)
+ax_file_exists(char *file)
 {
     FILE *f;
 
@@ -96,10 +96,10 @@
 {
     char com[512], zfile[512];
 
-    if (file_exists(file))
+    if (ax_file_exists(file))
         return fopen(file, mode);
     sprintf(zfile, "%s.Z", file);
-    if (file_exists(zfile)) {
+    if (ax_file_exists(zfile)) {
         sprintf(com, "gunzip -c %s.Z 2>/dev/null", file);
         return popen(com, mode);
     }
