From xemacs-m  Sun Mar  2 21:09:00 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id VAA16098
	for <xemacs-beta@xemacs.org>; Sun, 2 Mar 1997 21:08:52 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id TAA10954;
	Sun, 2 Mar 1997 19:20:14 -0800
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: --srcdir broken in b96
References: <199703022317.SAA01592@spacely.icd.teradyne.com>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Vinnie Shelton's message of Sun, 02 Mar 1997 18:17:31 -0500
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=US-ASCII
Date: 02 Mar 1997 19:20:12 -0800
Message-ID: <m2209xvez7.fsf@altair.xemacs.org>
Lines: 390
X-Mailer: Gnus v5.4.17/XEmacs 20.1

> !!!Warning!!! don't use --srcdir w/ b96!!!

Chuck has already sent me a patch to clean up dynamic PURESIZE.
Please try this out as soon as you can.

>Date: Sun, 02 Mar 1997 20:04:15 -0600
>From: Chuck Thompson <cthomp@xemacs.org>

I renamed src/PURESIZE.h to src/puresize_adjust.h.  It should not be
included in the distribution.  The build process will initialize it.
puresize.h now determines RAW_PURESIZE and adds PURESIZE_ADJUSTMENT
from puresize_adjust.h to it to get PURESIZE.  PURESIZE_ADJUSTMENT is
initially 0.  puresize.h still needs to be adjusted since the goal is
that out-of-the-box builds should as often as possible build just fine
on the very first pass and the dynamic stuff only kick in to deal with
local additions.  The --puresize flag now actually sets RAW_PURESIZE.
I also made the build process shutup about what it is doing with
SATISFIED.  I admit to personal preference there.


			-Chuck



===================================================================
RCS file: RCS/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- Makefile.in	1997/03/02 18:30:06	1.1
+++ Makefile.in	1997/03/03 00:35:45
@@ -281,7 +281,7 @@
 
 .RECURSIVE: ${SUBDIR}
 
-${SUBDIR}: ${SUBDIR_MAKEFILES} src/config.h FRC
+${SUBDIR}: ${SUBDIR_MAKEFILES} src/config.h src/puresize_adjust.h FRC
 	cd $@; $(MAKE) all $(MFLAGS) \
 		CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
 
@@ -303,6 +303,12 @@
 src/config.h: ${srcdir}/src/config.h.in
 	./config.status
 
+src/puresize_adjust.h:	${srcdir}/src/puresize.h
+	@echo "Resetting \`src/puresize_adjust.h'."
+	@echo '/* This file is generated by XEmacs, DO NOT MODIFY!!! */' > src/puresize_adjust.h
+	@echo '#define PURESIZE_ADJUSTMENT 0' >> src/puresize_adjust.h
+
+
 # ==================== Installation ====================
 
 ## If we let lib-src do its own installation, that means we
@@ -490,8 +496,6 @@
 	(cd dynodump && $(MAKE) $(MFLAGS) distclean)
 	-(cd man     && $(MAKE) $(MFLAGS) distclean)
 	-${top_distclean}
-	(echo "/* This file is generated by XEmacs, DO NOT MODIFY!!! */" > src/PURESIZE.h)
-	(echo "# define PURESIZE 1350000" >> src/PURESIZE.h)
 
 ### `realclean'
 ###      Delete everything from the current directory that can be
===================================================================
RCS file: RCS/configure,v
retrieving revision 1.1
diff -u -r1.1 configure
--- configure	1997/03/03 00:47:37	1.1
+++ configure	1997/03/03 00:49:52
@@ -902,7 +902,7 @@
           eval "${opt}=\"${val}\""
         ;;
 
-        ## Has the user specified a value for PURESIZE?
+        ## Has the user specified a value for RAW_PURESIZE?
 	"puresize" )
 	  ## If the value was omitted, get it from the next argument.
 	  if [ "${valomitted}" = "yes" ]; then
@@ -7227,12 +7227,12 @@
    
 {
 test -n "$verbose" && \
-echo "	defining" PURESIZE to be "${puresize}"
-echo "#define" PURESIZE "${puresize}" >> confdefs.h
-DEFS="$DEFS -DPURESIZE=${puresize}"
-ac_sed_defs="${ac_sed_defs}\${ac_dA}PURESIZE\${ac_dB}PURESIZE\${ac_dC}${puresize}\${ac_dD}
-\${ac_uA}PURESIZE\${ac_uB}PURESIZE\${ac_uC}${puresize}\${ac_uD}
-\${ac_eA}PURESIZE\${ac_eB}PURESIZE\${ac_eC}${puresize}\${ac_eD}
+echo "	defining" RAW_PURESIZE to be "${puresize}"
+echo "#define" RAW_PURESIZE "${puresize}" >> confdefs.h
+DEFS="$DEFS -DRAW_PURESIZE=${puresize}"
+ac_sed_defs="${ac_sed_defs}\${ac_dA}RAW_PURESIZE\${ac_dB}RAW_PURESIZE\${ac_dC}${puresize}\${ac_dD}
+\${ac_uA}RAW_PURESIZE\${ac_uB}RAW_PURESIZE\${ac_uC}${puresize}\${ac_uD}
+\${ac_eA}RAW_PURESIZE\${ac_eB}RAW_PURESIZE\${ac_eC}${puresize}\${ac_eD}
 "
 }
  
===================================================================
RCS file: RCS/configure.in,v
retrieving revision 1.1
diff -u -r1.1 configure.in
--- configure.in	1997/03/03 00:47:37	1.1
+++ configure.in	1997/03/03 00:49:38
@@ -918,7 +918,7 @@
           eval "${opt}=\"${val}\""
         ;;
 
-        ## Has the user specified a value for PURESIZE?
+        ## Has the user specified a value for RAW_PURESIZE?
 	"puresize" )
 	  ## If the value was omitted, get it from the next argument.
 	  if [ "${valomitted}" = "yes" ]; then
@@ -4101,7 +4101,7 @@
 # autodetection.
 
 if [ x"${puresize}" != x ] ; then
-  ] AC_DEFINE_UNQUOTED(PURESIZE,	${puresize}) [
+  ] AC_DEFINE_UNQUOTED(RAW_PURESIZE,	${puresize}) [
 fi
 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
   ] AC_DEFINE(HAVE_X_WINDOWS) [
===================================================================
RCS file: src/RCS/Makefile.in.in,v
retrieving revision 1.1
diff -u -r1.1 src/Makefile.in.in
--- src/Makefile.in.in	1997/03/02 18:31:26	1.1
+++ src/Makefile.in.in	1997/03/02 23:49:29
@@ -1218,18 +1218,18 @@
 	-if [ -w ${srcdir}/../lisp ]; then \
 	  w=`pwd`; cd ${srcdir}; $${w}/temacs -nl -batch -l inc-vers; \
 	else true; fi
-	touch SATISFIED
+	@touch SATISFIED
 	-$(DUMPENV) ./temacs -nl -batch -l loadup.el dump
-	if [ -f SATISFIED ]; then \
+	@if [ -f SATISFIED ]; then \
 		$(MAKE) release; \
 	fi
 #else /* ! defined (HAVE_SHM) */
 	-if [ -w ${srcdir}/../lisp ]; then \
 	  w=`pwd`; cd ${srcdir}; $${w}/temacs -batch -l inc-vers; \
 	else true; fi
-	touch SATISFIED
+	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	if [ -f SATISFIED ]; then \
+	@if [ -f SATISFIED ]; then \
 		$(MAKE) release; \
 	fi
 #endif /* ! defined (HAVE_SHM) */
@@ -1237,16 +1237,16 @@
 #endif /* ! defined (CANNOT_DUMP) */
 
 xemacs: temacs ${libsrc}DOC ${lisp} MOFILE OTHER_FILES
-	touch SATISFIED
+	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	if [ -f SATISFIED ]; then \
+	@if [ -f SATISFIED ]; then \
 		$(MAKE) xemacs; \
 	fi
 
 xemacs-no-site-file: temacs ${libsrc}DOC ${lisp} MOFILE OTHER_FILES
-	touch SATISFIED
+	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file
-	if [ -f SATISFIED ]; then \
+	@if [ -f SATISFIED ]; then \
 		$(MAKE) xemacs-no-site-file; \
 	fi
 
@@ -1475,6 +1475,11 @@
 	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
 	exit 1
 
+puresize_adjust.h: ${srcdir}/puresize.h
+	@echo "The file puresize_adjust still needs to be generated."
+	@echo "Please run 'make' from the top-level."
+	exit 1
+
 paths.h: ${srcdir}/paths.h.in
 	@echo "The file paths.h needs to be set up from paths.h.in."
 	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
@@ -1576,7 +1581,7 @@
 /**/# This is used in making a distribution.
 /**/# Do not use it on development directories!
 distclean: clean versionclean
-	rm -f config.h paths.h Emacs.ad.h Makefile Makefile.in .pure
+	rm -f config.h paths.h puresize_adjust.h Emacs.ad.h Makefile Makefile.in .pure
 realclean: distclean
 	rm -f TAGS
 versionclean:
@@ -1759,7 +1764,7 @@
 alloc.o: frame.h
 alloc.o: frameslots.h
 alloc.o: glyphs.h
-alloc.o: puresize.h PURESIZE.h
+alloc.o: puresize.h puresize_adjust.h
 alloc.o: redisplay.h
 alloc.o: scrollbar.h
 alloc.o: specifier.h
@@ -2904,7 +2909,7 @@
 pure.o: blocktype.h
 pure.o: config.h
 pure.o: dynarr.h
-pure.o: puresize.h PURESIZE.h
+pure.o: puresize.h puresize_adjust.h
 ralloc.o: blocktype.h
 ralloc.o: config.h
 ralloc.o: dynarr.h
===================================================================
RCS file: src/RCS/alloc.c,v
retrieving revision 1.1
diff -u -r1.1 src/alloc.c
--- src/alloc.c	1997/03/02 17:27:23	1.1
+++ src/alloc.c	1997/03/02 18:15:54
@@ -2576,18 +2576,19 @@
 PURESIZE_h(long int puresize)
 {
   int fd;
-  char *PURESIZE_h_file = "PURESIZE.h";
+  char *PURESIZE_h_file = "puresize_adjust.h";
   char *WARNING = "/* This file is generated by XEmacs, DO NOT MODIFY!!! */\n";
   char define_PURESIZE[256];
 
-  if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT)) < 0) {
-    report_file_error("Can't write PURESIZE",
+  if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT|O_TRUNC)) < 0) {
+    report_file_error("Can't write PURESIZE_ADJUSTMENT",
 		      Fcons(build_ext_string(PURESIZE_h_file, FORMAT_FILENAME),
 			    Qnil));
   }
 
   write(fd, WARNING, strlen(WARNING));
-  sprintf(define_PURESIZE, "# define PURESIZE %ld\n", puresize);
+  sprintf(define_PURESIZE, "# define PURESIZE_ADJUSTMENT %ld\n",
+	  puresize - RAW_PURESIZE);
   write(fd, define_PURESIZE, strlen(define_PURESIZE));
   close(fd);
 }
===================================================================
RCS file: src/RCS/config.h.in,v
retrieving revision 1.1
diff -u -r1.1 src/config.h.in
--- src/config.h.in	1997/03/03 00:47:52	1.1
+++ src/config.h.in	1997/03/03 00:49:14
@@ -346,7 +346,7 @@
 /* Allow the user to override the default value of PURESIZE at configure
    time.  This must come before we include the sys files in order for
    it to be able to override any changes in them. */
-#undef PURESIZE
+#undef RAW_PURESIZE
 
 
 /* Define this if you want to use the Common Desktop Environment
===================================================================
RCS file: src/RCS/puresize.h,v
retrieving revision 1.1
diff -u -r1.1 src/puresize.h
--- src/puresize.h	1997/03/02 17:30:17	1.1
+++ src/puresize.h	1997/03/03 01:23:31
@@ -24,17 +24,17 @@
 #ifndef PURESIZE_H
 #define PURESIZE_H
 
-/* If PURESIZE is already defined then the user overrode it at
+/* If RAW_PURESIZE is already defined then the user overrode it at
    configure time. */
-#ifndef PURESIZE
-#if 0
+#ifndef RAW_PURESIZE
+
 /* Basic amount of purespace to use, in the absence of extra
    things configured in. */
 
 #if (LONGBITS == 64)
 # define BASE_PURESIZE 944000
 #else
-# define BASE_PURESIZE 584000
+# define BASE_PURESIZE 527000
 #endif
 
 /* If any particular systems need to change the base puresize, they
@@ -50,29 +50,57 @@
 
 /* Extra amount of purespace needed for menubars. */
 
+#ifdef HAVE_DIALOGS
+# if (LONGBITS == 64)
+#  define DIALOG_PURESIZE_EXTRA 43000
+# else
+#  define DIALOG_PURESIZE_EXTRA 1800
+# endif
+#else
+# define DIALOG_PURESIZE_EXTRA 0
+#endif
+
 #ifdef HAVE_MENUBARS
 # if (LONGBITS == 64)
 #  define MENUBAR_PURESIZE_EXTRA 43000
 # else
-#  define MENUBAR_PURESIZE_EXTRA 35000
+#  define MENUBAR_PURESIZE_EXTRA 36000
 # endif
 #else
 # define MENUBAR_PURESIZE_EXTRA 0
 #endif
 
-/* Scrollbar purespace needed is only about 2K so there's no sense
-   worrying about it separately. */
+#ifdef HAVE_SCROLLBARS
+# if (LONGBITS == 64)
+#  define SCROLLBAR_PURESIZE_EXTRA 4000
+# else
+#  define SCROLLBAR_PURESIZE_EXTRA 1800
+# endif
+#else
+# define SCROLLBAR_PURESIZE_EXTRA 0
+#endif
+
+#ifdef HAVE_TOOLBARS
+# if (LONGBITS == 64)
+#  define TOOLBAR_PURESIZE_EXTRA 4000
+# else
+#  define TOOLBAR_PURESIZE_EXTRA 8400
+# endif
+#else
+# define TOOLBAR_PURESIZE_EXTRA 0
+#endif
 
-/* Extra amount of purespace needed for X11, separate from menubars. */
+/* Extra amount of purespace needed for X11, separate from menubars
+   and scrollbars. */
 
 #ifdef HAVE_X_WINDOWS
 # if (LONGBITS == 64)
 #  define X11_PURESIZE_EXTRA 95000
 # else
-#  define X11_PURESIZE_EXTRA 63000
+#  define X11_PURESIZE_EXTRA 50000
 # endif
 #else
-# define X11_PURESIZE_EXTRA 10000
+# define X11_PURESIZE_EXTRA 0
 #endif
 
 /* Extra amount of purespace needed for Mule. */
@@ -93,7 +121,7 @@
 # if (LONGBITS == 64)
 #  define TOOLTALK_PURESIZE_EXTRA 100000
 # else
-#  define TOOLTALK_PURESIZE_EXTRA 69000
+#  define TOOLTALK_PURESIZE_EXTRA 8300
 # endif
 #else
 # define TOOLTALK_PURESIZE_EXTRA 0
@@ -115,16 +143,21 @@
 # define SUNPRO_PURESIZE_EXTRA 0
 #endif
 
-#define PURESIZE ((BASE_PURESIZE) + (MENUBAR_PURESIZE_EXTRA) +		  \
-		  (X11_PURESIZE_EXTRA) +				  \
-		  (SYSTEM_PURESIZE_EXTRA) + (MULE_PURESIZE_EXTRA) +	  \
-		  (TOOLTALK_PURESIZE_EXTRA) + (ENERGIZE_PURESIZE_EXTRA) + \
-		  (SUNPRO_PURESIZE_EXTRA))
-
-#endif
+#define RAW_PURESIZE ((BASE_PURESIZE) +					\
+		      (DIALOG_PURESIZE_EXTRA) +				\
+		      (MENUBAR_PURESIZE_EXTRA) +			\
+		      (SCROLLBAR_PURESIZE_EXTRA) +			\
+		      (TOOLBAR_PURESIZE_EXTRA) +			\
+		      (X11_PURESIZE_EXTRA) +				\
+		      (SYSTEM_PURESIZE_EXTRA) +				\
+		      (MULE_PURESIZE_EXTRA) +				\
+		      (TOOLTALK_PURESIZE_EXTRA) +			\
+		      (ENERGIZE_PURESIZE_EXTRA) +			\
+		      (SUNPRO_PURESIZE_EXTRA))
 
-# include "PURESIZE.h"
+#endif /* !RAW_PURESIZE */
 
-#endif /* !PURESIZE */
+#include "puresize_adjust.h"
+#define PURESIZE ((RAW_PURESIZE) + (PURESIZE_ADJUSTMENT))
 
 #endif /* PURESIZE_H */


-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

