<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2355: Mutt can't be built with a separate build dir and read-only source dir



The following reply was made to PR mutt/2355; it has been noted by GNATS.

From: Rocco Rutte <pdmef@xxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2355: Mutt can't be built with a separate build dir and 
read-only source dir
Date: Sat, 15 Jul 2006 15:48:27 +0000

 --xHFwDpU9dbj6ez1V
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Disposition: inline
 
 Hi,
 
 * vincent@xxxxxxxxxx [06-07-14 19:01:44 +0200] wrote:
 
 >The makefile has errors so that Mutt can't be built with a separate build dir 
 >and read-only source dir.
 
 Attached is a patch fixing it here for po/ and doc/ subdirs including 
 the SCO/Solaris fix for the cut(1) call in doc/Makefile sent by someone 
 else in reply to the 1.5.12 announcement.
 
 This still does not work for intl/ (--with-included-gettext) and I can't 
 fix it easily.
 
 There, plural.c is under version control and auto-generated. If no 
 suitable bison(1) tool is found, m4/gettext.m4 defines it to ':' so that 
 building works for srcdir==builddir. A real fix should include a rule 
 that copies plural.c from source to builddir instead.
 
 My idea is to move the whole definition for the bison(1) call only to 
 m4/gettext.m4 and there define the copy rule if builddir!=srcdir.
 
 So the attached patches fixes this bug only partly.
 
    bye, Rocco
 -- 
 :wq!
 
 --xHFwDpU9dbj6ez1V
 Content-Type: text/x-patch; charset=us-ascii
 Content-Disposition: attachment; filename="patch-build.diff"
 
 diff --git a/doc/Makefile.in b/doc/Makefile.in
 index ae98cee..36e0b91 100644
 --- a/doc/Makefile.in
 +++ b/doc/Makefile.in
 @@ -167,6 +167,9 @@ dist distdir: Makefile $(DISTFILES)
  ../makedoc$(EXEEXT): $(top_srcdir)/makedoc.c
        (cd .. && $(MAKE) makedoc$(EXEEXT))
  
 +../reldate.h:
 +      (cd .. && $(MAKE) reldate.h)
 +
  update-doc: stamp-doc-xml stamp-doc-chunked manual.txt manual.html
  
  muttrc.man: ../makedoc$(EXEEXT) $(top_srcdir)/init.h muttrc.man.head 
muttrc.man.tail
 @@ -182,9 +185,9 @@ mutt.1: $(srcdir)/mutt.man
        $(EDIT) $(srcdir)/mutt.man > $@
  
  stamp-doc-xml: $(top_srcdir)/makedoc.c $(top_srcdir)/init.h manual.xml.head 
manual.xml.tail \
 -               $(top_srcdir)/VERSION $(top_srcdir)/reldate.h
 +               $(top_srcdir)/VERSION ../reldate.h
        $(MAKE) ../makedoc$(EXEEXT)
 -      ( sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` (`cut -d\\" -f2 
$(top_srcdir)/reldate.h`)/" $(srcdir)/manual.xml.head ;\
 +      ( sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` (`cut -d\\\" -f2 
../reldate.h`)/" $(srcdir)/manual.xml.head ;\
          $(MAKEDOC_CPP) $(top_srcdir)/init.h | ../makedoc -s ) |      \
                cat - $(srcdir)/manual.xml.tail > manual.xml
        touch stamp-doc-xml
 diff --git a/po/Makefile.in.in b/po/Makefile.in.in
 index 09fb703..10da9ef 100644
 --- a/po/Makefile.in.in
 +++ b/po/Makefile.in.in
 @@ -12,6 +12,7 @@ VERSION = @VERSION@
  # These two variables depend on the location of this directory.
  subdir = po
  top_builddir = ..
 +builddir = $(top_builddir)/$(subdir)
  
  SHELL = /bin/sh
  @SET_MAKE@
 @@ -68,7 +69,7 @@ CATALOGS = @CATALOGS@
        $(MSGFMT) -o $@ $<
  
  .po.gmo:
 -      file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
 +      file=$(builddir)/`echo $* | sed 's,.*/,,'`.gmo \
          && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
  
  
 
 --xHFwDpU9dbj6ez1V--