Path: utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!ucbvax!agate!apple!bionet!ames!fxgrp!news From: grady@fxgrp.fx.com (Steven Grady) Newsgroups: gnu.utils.bug Subject: make 3.55 infinite loop Message-ID: <1989Aug31.014333.18904@fxgrp.fx.com> Date: 31 Aug 89 01:43:33 GMT Reply-To: grady@fxgrp.fx.com (Steven Grady) Organization: FXDevelopment, Mountain View, CA Lines: 59 It seems like the new feature that a production that has commands but no dependencies should always be executed is a mistake. I believe this should only be the case if it is a phony target. If it's a real file, then a valid interpretation of having no dependencies is that this is the set of commands to do to _create_ the file. If the file exists, no commands need to run. I'm not sure I am right about this, however. If you are still interested, keep reading -- I'll describe the problem I'm having in detail. I have a makefile system that is kind of complicated. I include a file called $(DEPENDENCIES), which is in an architecture-dependent subdirectory. In this case, I'm running the program on a sun3. $(DEPENDENCIES) (in this case, "sun3/Dependencies") has a production to create it from the "Dependencies" file in the current directory. This "Dependencies" file is modified by mkmf. Furthermore, if the "Dependencies" file doesn't exist (ie the first time you run the make), it will be copied from a template file (in my case, a file called "/usr/aws/etc/GnuMake/DependTmpl"). The idea is that if you do a "gnumake depend", the "Dependencies" file gets created, then updated. If you then do a "gnumake" (on a sun3), the "sun3/Dependencies" file depends on "Dependencies", so it gets updated. This new "sun3/Dependencies" file is then included. This all worked fine until 3.55. Under 3.55, if I say "gnumake", it starts going into an infinite loop, saying the following: cp /usr/aws/etc/GnuMake/DependTmpl Dependencies chmod ug+w Dependencies gnumake depend cp /usr/aws/etc/GnuMake/DependTmpl Dependencies chmod ug+w Dependencies gnumake depend ... When I run it with "-d", here is the beginning of the output: Reading makefiles... Updating makefiles.... Considering target file `sun3/Dependencies'. Considering target file `Dependencies'. Finished dependencies of target file `Dependencies'. Target `Dependencies' has commands but no dependencies. Must remake target `Dependencies'. Here is the relevant rule: $(DEPENDFILE): cp $(MAKEDIR)/DependTmpl $(DEPENDFILE) chmod ug+w $(DEPENDFILE) $(MAKE) depend What's happening is that the file gets copied (since it has commands but no dependencies), then gnumake gets re-invoked. It then runs the same rules, causing gnumake to be re-invoked, etc. Steven ...!ucbvax!grady grady@postgres.berkeley.edu "Guards, beat this man brutally for daring to try to confuse me!"