ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS "make dist" problem


From: R. Bernstein
Subject: CVS "make dist" problem
Date: Fri, 24 Feb 2006 22:30:23 -0500

In doing the last couple of candidate releases I ran across the
following problem (now fixed in the pydb branch). 

Running "make dist":

  % make dist
  { test ! -d ddd-3.3.12-test2 || { find ddd-3.3.12-test2 -type d ! -perm -200 
-exec chmod u+w {} ';' && rm -fr ddd-3.3.12-test2; }; }
  mkdir ddd-3.3.12-test2
...
  make[1]: Entering directory `/src/external-cvs/ddd-head/ddd'
  CONFIG_FILES=./../ddd.spec CONFIG_HEADERS= /bin/sh ../config.status
  config.status: creating ./../ddd.spec
  config.status: executing depfiles commands
  mkdir: `ddd' exists but is not a directory
  config.status: error: cannot create directory "ddd"
  make[1]: *** [../ddd-3.3.12-test2-1.spec] Error 1
  make[1]: Leaving directory `/src/external-cvs/ddd-head/ddd'
  make: *** [distdir] Error 1

Well, I wrote this nicer GNU Make debugger and execution tracer which
does better at giving error status. Here's the end of that:

  mkdir: `ddd' exists but is not a directory
  config.status: error: cannot create directory "ddd"
  Makefile:3224: *** [../ddd-3.3.12-test2-1.spec] Error 1

  #0  ../ddd-3.3.12-test2-1.spec at /src/external-cvs/ddd-head/ddd/Makefile:3224
  #1  distdir at /src/external-cvs/ddd-head/ddd/Makefile:2293
  remake[1]: Leaving directory `/src/external-cvs/ddd-head/ddd'
  Command-line arguments:
             "top_distdir=/src/external-cvs/ddd-head/ddd-3.3.12-test2 
distdir=/src/external-cvs/ddd-head/ddd-3.3.12-test2/ddd distdir"
  Makefile:560: *** [distdir] Error 1

  #0  distdir at /src/external-cvs/ddd-head/Makefile:560
  #1  dist at /src/external-cvs/ddd-head/Makefile:604
  Command-line arguments:
             "dist"

In either case what's going on is that ddd wants to create an RPM SPEC
file; the way it does this is by running config.status. However all of
this is run not from the top-level directory but from the ddd
directory underneath. So config.status is getting confused and wants
to create yet *another* ddd directory. However the ddd *binary* is
already there. 3 ddd directories for ddd! :o)

The remake version of GNU make helpfully indicates that the problem is
at Makefile:3224 where we see this: 

$(srcdir)/../$(ddd)-$(VERSION)-$(REL).spec: $(srcdir)/../ddd.spec.in 
$(top_builddir)/config.status
    CONFIG_FILES=$(srcdir)/../ddd.spec CONFIG_HEADERS= $(SHELL) 
$(top_builddir)/config.status
    $(SED) 's/@REL@/$(REL)/g' $(srcdir)/../ddd.spec > $@
    $(RM) $(srcdir)/../ddd.spec


What I think is wrong wrong wrong is having ddd create the SPEC file
from down in that ddd directory rather from the top level like it's
done in almost any other project.  As a result, all of that
$(srcdir)/../ stuff appears in the spec target. And as we've seen,
it's wrong anyway because config.status needs to run with the current
directory as $top_builddir. (or is it $top_srcdir)?

I think this is a historical artifact of times long past when there
perhaps weren't directories but one Makefile, namely that humongous
one in the ddd directory where the source code lives.

In the pydb branch, I've moved this RPM spec-creation code into the
top-level makefile and this not onliy solves the problem but
simplifies things as $(srcdir)/../ isn't needed any more. But probably
all of this could get deleted totally. I bet each RPM distribution
uses it's own SPEC file rather than ddd's. (At least that's true on my
other projects where there are folks that have made RPM packages.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]