I noticed some very odd behavior from dmake while working on my changes
to support auto-generation of OpenSolaris deliveries (CR 6467531).  The
following seems to be a reproducible test case:

1. set up a workspace with a copy of the build 55 snapshot (open and
   closed trees).
2. touch $SRC/Makefile.dummy
3. apply this patch to $SRC/lib/Makefile.targ:

--- /tmp/geta553        Tue Jan 16 17:51:15 2007
+++ Makefile.targ       Tue Jan 16 15:23:34 2007
@@ -111,3 +111,5 @@
 clean:
        -$(RM) $(OBJS)
        -$(RM) $(PICS) $(DUPLICATE_SRC) $(LINTOUT) $(LINTLIB) $(CLEANFILES)
+
+include $(SRC)/Makefile.dummy

4. Try to build the workspace using nightly(1) (debug-only; x86).

The build eventually blows up in usr/closed/lib/smartcard/cmd with

  /net/tonic-gate/builds2/kupfer/dmake-include-test/usr/closed/lib/smartcard/cmd
  dmake: Warning: Infinite loop: Target 
`/home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy' depends on itself
  Current working directory 
/net/tonic-gate/builds2/kupfer/dmake-include-test/usr/closed/lib/smartcard/cmd
  /usr/bin/rm -f /home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy; 
install -s -m 644 -f /home/kupfer/ws/dmake-include-test/usr/src 
/home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy
  /home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy: No such file or 
directory
  *** Error code 1
  dmake: Warning: Infinite loop: Target 
`/home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy' depends on itself
  Current working directory 
/net/tonic-gate/builds2/kupfer/dmake-include-test/usr/closed/lib/smartcard/cmd
  /usr/bin/rm -f /home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy; 
install -s -m 644 -f /home/kupfer/ws/dmake-include-test/usr/src 
/home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy
  /home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy: No such file or 
directory
  *** Error code 1
  dmake: Couldn't dmake 
`/home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy'
  dmake: Fatal error in reader: 
/home/kupfer/ws/dmake-include-test/usr/src/lib/Makefile.targ, line 115: Read of 
include file `/home/kupfer/ws/dmake-include-test/usr/src/Makefile.dummy' failed
  Current working directory 
/net/tonic-gate/builds2/kupfer/dmake-include-test/usr/closed/lib/smartcard/cmd
  *** Error code 1

The original failure was with a non-empty makefile, so the fact that
Makefile.dummy is zero bytes is not the problem.  Moving the "include"
line to earlier in Makefile.targ makes the problem go away.

I'm planning to file a bug, but I thought I'd first see if anyone has
seen something like this before.  This is the dmake version:

    dmake: Sun Distributed Make 7.7 2005/10/13

thanks,
mike
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to