zsh-workers
 help / color / mirror / code / Atom feed
* PATCH 3.1.5-pws-10: Fix
@ 1999-03-02  6:59 Matt Armstrong
  1999-03-02  8:53 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Armstrong @ 1999-03-02  6:59 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

> So, make first removes (among others) modules-bltin, _then_ 
> excutes distclean-modules, that depends on Makemod that 
> depends on modules-bltin ... that reruns our nice scripts 
> and leaves some files around (because they already are deleted
> from make's point of view :-).

Here is a collection of dependency fixes.

1) I made modules-bltin depend on Makefile.  This forces it to get 
re-made after a re-configure (this would have saved me a chunk of time 
the other night...)

2) I moved the module deletion stuff _above_ the @@clean.mk@@ in 
Src/Makefile.in.  This causes the module deletion dependencies to get 
entered first into the dependency graph, and so they get deleted first 
too (before Makemod does).  This gets rid of all the stupidity where 
Makemod gets created right after it is deleted.

3) I moved the deletion of modules.index and modules-bltin out of 
distclean and into clean.  I saw no compelling reason for it to be in 
distclean.  I think removing reasons for 'make distclean' is good.


--
I'm really matt_armstrong@bigfoot.com.  My ISP is blacklisted by
http://www.orbs.org, so I must use hotmail.  :-(


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

[-- Attachment #2: makemod.dependency.patch.txt --]
[-- Type: text/plain, Size: 1758 bytes --]

*** Src/Makefile.in.orig	Mon Mar  1 22:08:08 1999
--- Src/Makefile.in	Mon Mar  1 22:52:20 1999
***************
*** 112,118 ****
  
  # ========== LINKING IN MODULES ==========
  
! modules-bltin:
  	if test @D@ = N; then \
  	    cat $(sdir)/xmods.conf > $@; \
  	elif test @RTLD_GLOBAL_OK@ != yes; then \
--- 112,118 ----
  
  # ========== LINKING IN MODULES ==========
  
! modules-bltin: Makefile
  	if test @D@ = N; then \
  	    cat $(sdir)/xmods.conf > $@; \
  	elif test @RTLD_GLOBAL_OK@ != yes; then \
***************
*** 175,192 ****
  
  # ========== DEPENDENCIES FOR CLEANUP ==========
  
! @@clean.mk@@
  
  mostlyclean-here:
  	rm -f stamp-modobjs stamp-modobjs.tmp
  
  clean-here:
  	rm -f modules.index.tmp modules.stamp zsh ansi2knr.o ansi2knr
  	rm -f libzsh-*.$(DL_EXT)
  
  distclean-here:
  	rm -f TAGS tags
! 	rm -f modules.index modules-bltin Makefile
  
  mostlyclean: mostlyclean-modules
  clean: clean-modules
--- 175,195 ----
  
  # ========== DEPENDENCIES FOR CLEANUP ==========
  
! # Since module cleanup rules depend on Makemod, they come first.  This
! # forces module stuff to get cleaned before Makemod itself gets
! # deleted.
  
  mostlyclean-here:
  	rm -f stamp-modobjs stamp-modobjs.tmp
  
  clean-here:
  	rm -f modules.index.tmp modules.stamp zsh ansi2knr.o ansi2knr
+ 	rm -f modules.index modules-bltin
  	rm -f libzsh-*.$(DL_EXT)
  
  distclean-here:
  	rm -f TAGS tags
! 	rm -f Makefile
  
  mostlyclean: mostlyclean-modules
  clean: clean-modules
***************
*** 195,200 ****
--- 198,205 ----
  
  mostlyclean-modules clean-modules distclean-modules realclean-modules: Makemod
  	@$(MAKE) -f Makemod $(MAKEDEFS) `echo $@ | sed 's/-modules//'`
+ 
+ @@clean.mk@@
  
  # ========== RECURSIVE MAKES ==========
  

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH 3.1.5-pws-10: Fix
  1999-03-02  6:59 PATCH 3.1.5-pws-10: Fix Matt Armstrong
@ 1999-03-02  8:53 ` Peter Stephenson
  1999-03-02  9:25   ` Andrej Borsenkow
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 1999-03-02  8:53 UTC (permalink / raw)
  To: zsh-workers

"Matt Armstrong" wrote:
> 1) I made modules-bltin depend on Makefile.  This forces it to get 
> re-made after a re-configure (this would have saved me a chunk of time 
> the other night...)
>
>...
> 3) I moved the deletion of modules.index and modules-bltin out of 
> distclean and into clean.  I saw no compelling reason for it to be in 
> distclean.  I think removing reasons for 'make distclean' is good.

The point may have been that in principle you get to pick what modules are
builtin, e.g. you decide you'd prefer to have zle linked in so stick it in
modules-bltin by hand --- see INSTALL.  But it's (in retrospect, at least)
asking for trouble to have a file both generated by hand and automatically.
We could have a separate file that is used unconditionally if it exists ---
no make dependencies, so no rebuilding/deleting horror --- but gets removed
by a distclean, which is appropriate in this case since it's now
configuration information.  How does that sound?  I could even probably be
persuaded it shouldn't be removed automatically at all.  (This is a
post-Matt patch.)

--- INSTALL.matt2	Tue Mar  2 09:39:40 1999
+++ INSTALL	Tue Mar  2 09:42:37 1999
@@ -56,10 +56,11 @@
 
 By default the comp1, compctl, zle, sched and rlimits modules are compiled
 into non-dynamic zsh and no modules are compiled into the main binary if
-dynamic loading is available.  This can be overridden by creating the
-Src/modules-bltin file with the list of modules which are to be compiled
-into the main binary.  See the zshmodules manual page for the list of
-available modules.
+dynamic loading is available.  This can be overridden by creating the file
+mymods.conf in the compilation directory (Src, unless you have told
+configure to use another directory) with the list of modules which are to
+be compiled into the main binary.  See the zshmodules manual page for the
+list of available modules.
 
 Compiler Options or Using a Different Compiler
 ----------------------------------------------
--- Src/Makefile.in.matt2	Tue Mar  2 09:39:32 1999
+++ Src/Makefile.in	Tue Mar  2 09:40:38 1999
@@ -113,7 +113,9 @@
 # ========== LINKING IN MODULES ==========
 
 modules-bltin: Makefile
-	if test @D@ = N; then \
+	if test -f mymods.conf; then \
+	    cat mymods.conf > $@; \
+	elif test @D@ = N; then \
 	    cat $(sdir)/xmods.conf > $@; \
 	elif test @RTLD_GLOBAL_OK@ != yes; then \
 	    echo comp1 > $@; \
@@ -189,7 +191,7 @@
 
 distclean-here:
 	rm -f TAGS tags
-	rm -f Makefile
+	rm -f Makefile mymods.conf
 
 mostlyclean: mostlyclean-modules
 clean: clean-modules

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: PATCH 3.1.5-pws-10: Fix
  1999-03-02  8:53 ` Peter Stephenson
@ 1999-03-02  9:25   ` Andrej Borsenkow
  0 siblings, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 1999-03-02  9:25 UTC (permalink / raw)
  To: Peter Stephenson, zsh-workers


> We could have a separate file that is used unconditionally if it
> exists ---
> no make dependencies, so no rebuilding/deleting horror --- but
> gets removed
> by a distclean, which is appropriate in this case since it's now
> configuration information.  How does that sound?

That reminds me. Why cannot we
have --enable-dynamic-modules/--enable-static-modules in configure? That is
really better as having separate file that needs to be edited by hand.

  I could even probably be
> persuaded it shouldn't be removed automatically at all.

It should be removed by distclean in any case. That is exactly the point,
why configure argument is much better. You could the have a standard
config.zsh, that runs configure with all desired options.

/andrej


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-02  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-02  6:59 PATCH 3.1.5-pws-10: Fix Matt Armstrong
1999-03-02  8:53 ` Peter Stephenson
1999-03-02  9:25   ` Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).