Menu

#1030 distclean target doesn't always work

obsolete: 8.3.3
closed-wont-fix
5
2001-09-18
2001-07-07
Lloyd Lim
No

Example: Put Tk source in directory foo/tk8.3.3.
Configure and compile. Move Tk directory by doing 'mv
foo bar'. Try 'make distclean'. It says:

make: *** No rule to make target `/n/bmrca/users/lim/
src/foo/tk8.3/unix/Makefile.in', needed by `Makefile'.
Stop.

This problem does not happen with the Tcl makefile.

My guess is that there is some kind of target problem.
The distclean target does not reference any fully
specified paths, so some other target must be getting
invoked unnecessarily.

Discussion

  • Lloyd Lim

    Lloyd Lim - 2001-07-10

    Logged In: YES
    user_id=99220

    I've looked into this problem. It wants to make Makefile.in
    because UNIX_DIR is a fully qualified path (which no longer
    exists after you move it).

    The problem can be fixed by removing the line:
    srcdir=`cd $srcdir ; pwd`
    However, this line was apparently added to fix Bug 4237.
    Without being able to look at the bug report, I can't
    evaluate the merit of this line. I think this patch is
    questionable though because it breaks make clean and make
    distclean, which should always work.

     
  • Don Porter

    Don Porter - 2001-07-11

    Logged In: YES
    user_id=80530

    Bug 4237 (the Scriptics numbering system) is now
    Bug 220688 (SourceForge numbering system).

     
  • Lloyd Lim

    Lloyd Lim - 2001-08-01

    Logged In: YES
    user_id=99220

    I've looked into bug #220688 (formerly bug #4237). I commented out the line that fully qualifies srcdir.
    Then I tried the following sequence:

    cd tcl8.3.3/unix
    make -s distclean
    configure
    make -s
    cd tk8.3.3/unix
    make -s distclean
    configure
    make -s
    make runtest

    I tried both "make runtest" and "make test" at the end. I tried it on Linux (Red Hat 6.2 & 7.0), FreeBSD
    (2.2.5, 3.3, 4.1), and Solaris (7). It successfully made tcltest without needing the fully qualified srcdir.

    I can't see any reason for having this line, so I recommend the following patch to take it out:

    --- configure.in.old Wed Aug 1 11:30:24 2001
    +++ configure.in Wed Aug 1 11:31:33 2001
    @@ -17,8 +17,6 @@
    if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$prefix
    fi
    -# Make sure srcdir is fully qualified!
    -srcdir=`cd $srcdir ; pwd`
    TK_SRC_DIR=`cd $srcdir/..; pwd`

    AC_PROG_RANLIB

     
  • Donal K. Fellows

    • assigned_to: nobody --> mdejong
     
  • Mo DeJong

    Mo DeJong - 2001-08-25

    Logged In: YES
    user_id=90858

    I don't see why you think this is a bug. You can't move
    the srcdir after running configure and expect the
    generated Makefile to work. Your patch would break
    the build when srcdir != builddir. I don't even see
    how the existing Tcl Makefile would work in this
    situation since the rule is as follows:

    Makefile: $(UNIX_DIR)/Makefile.in
    $(SHELL) config.status

    I would rather just close this as not a bug.
    Comments?

     
  • Lloyd Lim

    Lloyd Lim - 2001-08-26

    Logged In: YES
    user_id=99220

    I consider this a bug because I can't remember the last time I used a Makefile that had similar fully qualified
    paths and where "make distclean" didn't work. I don't expect the Makefile to work after moving the source
    around, but I think the desired behavior should be that "make distclean" always work.

    Since you mentioned building in a different directory, I just tried the following:

    cd /tmp/test/tcl
    ~/src/mash-code/tcl8.3/unix/configure
    make -s
    cd /tmp/test/tk
    ~/src/mash-code/tk8.3/unix/configure --with-tcl=../tcl
    make -s
    make -s test

    This is with Tcl/Tk 8.3.3 with the Tk patched as below to remove line fully qualifying srcdir.

    Tcl compiled just fine. Tk compiled just fine. make test in the Tk directory forced tcltest to be made, as
    desired.

    I still don't see any justification for fully qualifying srcdir. Give me an example where the patch doesn't work
    and I'll close this report myself.

     
  • Mo DeJong

    Mo DeJong - 2001-09-18

    Logged In: YES
    user_id=90858

    I think the problem has to do with running configure
    scripts in sub directories. See this note in Makefile.in:

    # Must be absolute because of the cd dltest
    $(DLTEST_DIR)/configure below.
    DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest

    I think the problems shows up when you run make
    test and it tries to build the shared lib tests
    in the dltest subdir.

     
  • Mo DeJong

    Mo DeJong - 2001-09-18
    • status: open --> closed-wont-fix
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.