From xemacs-m  Thu Jul 10 20:57:49 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 UAA15963
	for <xemacs-beta@xemacs.org>; Thu, 10 Jul 1997 20:57:45 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.6/8.8.6) id TAA24916;
	Thu, 10 Jul 1997 19:00:50 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: [PATCH] src/Makefile fix to avoid unnecessary redumps
X-Url: http://www.miranova.com/%7Esteve/
X-Face: `'%\i;ySOu]g?NlziJSk_$&@]KP`}~PEQPjZ5;nxSaDW_o$4+4%Ab]%Ifw3ZR;7TIT3,O,'
 @2{L;]ox6kc;$_5kU'n**9vFg-]eV~GbxSVCx|(s%uR[],*:^WKmC`B}(;|k9/m]gwt?&`t;^rfCJg
 khHH>pP1W\)xM0U@!FNDD72{3fDP$PkBhx^7Z?-WxH6DbFN:QOnT`llzW}VGdYv;n9lzljQvKTIBhQ
 YuV
X-Attribution: sb
From: Steven L Baur <steve@xemacs.org>
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=US-ASCII
Date: 10 Jul 1997 19:00:50 -0700
Message-ID: <m2vi2itkj1.fsf@altair.xemacs.org>
Lines: 86
X-Mailer: Gnus v5.4.62/XEmacs 20.3(beta13) - "Brussels"

Here's another build patch.  I've tested it with --srcdir and various
combinations of things out of date and it appears to be working.  This 
patch eliminates messy multiple builds.

[I'm not over-fond of using flag files, but the exit(2) return codes
are rather useless until the exit logic gets cleaned up].

1997-07-10  Steven L Baur  <steve@altair.xemacs.org>

	* Makefile.in.in (dump-elcs): Shouldn't use SATISFIED hack.
	(xemacs-no-site-file): Not supported any more.
	(binary): New dependency for dumping XEmacs.
	(xemacs): Attempt to be a little smarter about not dumping a new
	XEmacs if it is not needed.
	(temacs): Remove `xemacs' after success.

Index: src/Makefile.in.in
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/src/Makefile.in.in,v
retrieving revision 1.33
diff -u -r1.33 Makefile.in.in
--- Makefile.in.in	1997/07/09 04:31:43	1.33
+++ Makefile.in.in	1997/07/11 00:56:41
@@ -25,7 +25,7 @@
 @SET_MAKE@
 
 all: xemacs
-.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
+.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint binary
 
 ## For performance and consistency, no built-in rules.
 .SUFFIXES:
@@ -301,15 +301,19 @@
 
 FRC.DOC:
 
-xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} dump-elcs
-	@touch SATISFIED
-	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
-	@$(RM) SATISFIED
+FRC.xemacs:
+
+xemacs: temacs ${libsrc}DOC $(mo_file) ${other_files} FRC.xemacs
+	@touch NOBYTECOMPILE
+	-${DUMPENV} ./temacs -batch -l ../prim/update-elc.el
+	if test -f NOBYTECOMPILE || test ! -f xemacs; then \
+		$(MAKE) binary; \
+	fi
+	@$(RM) NOBYTECOMPILE
 
-xemacs-no-site-file: temacs ${libsrc}DOC $(mo_file) ${other_files} dump-elcs
+binary: temacs
 	@touch SATISFIED
-	-$(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file
+	-$(DUMPENV) ./temacs -batch -l loadup.el dump
 	@if test ! -f SATISFIED; then $(MAKE) $@; fi
 	@$(RM) SATISFIED
 
@@ -333,10 +337,7 @@
 dump_elcs: dump-elcs
 
 dump-elcs: temacs
-	@touch SATISFIED
 	-${DUMPENV} ./temacs -batch -l ../prim/update-elc.el
-	@if test ! -f SATISFIED; then $(MAKE) $@; fi
-	@$(RM) SATISFIED
 
 all-elc all-elcs:
 	cd .. && $(MAKE) all-elc $(MFLAGS)
@@ -392,7 +393,9 @@
  -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
 
 temacs: $(temacs_deps)
-	$(LD) $(temacs_link_args)
+	if $(LD) $(temacs_link_args); then \
+		$(RM) xemacs; \
+	fi
 
 rtc_patch.o:
 	rtc_patch_area -o $@


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

