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

wildcard in doc/Makefile.{am,in} causes problems when hacking OPS files



Hi,


I have recently been working on some enhancements for Mutt which include
a change to the file OPS.  I like to keep copies of the original
versions of the files I change and use the .orig suffix to indicate
such.  My editor also keeps backups of files changed and it uses the
suffix ~.  This means I could have three versions of a file, e.g.
mx.c.orig mx.c~ mx.c.  This works fine except when I change any of the
OPS files.  This is because the Makefile in doc/ has a statement which
includes a wildcard for the OPS files, i.e. OPS*, which of course causes
all of my backup files to be included along with the correct files. :-(

Automake is one of those things that has passed me by over the years, so
trying to "fix" this problem has not been fun.  The attached changes do
work (for me at least), but they really need an automake expert to look
over and correct. :-)

Many thanks.


Cheers,
       Nick.
-- 

--- doc/Makefile.am.orig        2007-11-30 08:00:04.000000000 +0000
+++ doc/Makefile.am
@@ -43,6 +43,9 @@
        ChangeLog.old                                   \
        README NEWS TODO README.SECURITY README.SSL 
 
+OPS = $(top_srcdir)/OPS $(top_srcdir)/OPS.CRYPT $(top_srcdir)/OPS.MIX \
+       $(top_srcdir)/OPS.PGP $(top_srcdir)/OPS.SMIME
+
 all: makedoc-all
 
 makedoc-all: mutt.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked 
manual.txt
@@ -160,12 +163,12 @@
        $(EDIT) $(srcdir)/mutt.man > $@
 
 stamp-doc-xml: makedoc$(EXEEXT) $(top_srcdir)/init.h \
-               manual.xml.head $(top_srcdir)/functions.h $(top_srcdir)/OPS* 
manual.xml.tail \
+               manual.xml.head $(top_srcdir)/functions.h $(OPS) 
manual.xml.tail \
                $(srcdir)/gen-map-doc $(top_srcdir)/VERSION 
$(top_srcdir)/ChangeLog
        ( date=`head -n 1 $(top_srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 1` 
&& \
          sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` ($$date)/" 
$(srcdir)/manual.xml.head && \
          $(MAKEDOC_CPP) $(top_srcdir)/init.h | ./makedoc$(EXEEXT) -s && \
          $(MAKEDOC_CPP) $(top_srcdir)/functions.h | \
-           perl $(srcdir)/gen-map-doc $(srcdir)/manual.xml.tail 
$(top_srcdir)/OPS* \
+           perl $(srcdir)/gen-map-doc $(srcdir)/manual.xml.tail $(OPS) \
        ) > manual.xml
        touch stamp-doc-xml
--- doc/Makefile.in.orig        2008-01-10 08:00:20.000000000 +0000
+++ doc/Makefile.in
@@ -142,7 +142,6 @@
 MUTTLIBS = @MUTTLIBS@
 MUTT_LIB_OBJECTS = @MUTT_LIB_OBJECTS@
 OBJEXT = @OBJEXT@
-OPS = @OPS@
 OSPCAT = @OSPCAT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -599,13 +598,13 @@
        $(EDIT) $(srcdir)/mutt.man > $@
 
 stamp-doc-xml: makedoc$(EXEEXT) $(top_srcdir)/init.h \
-               manual.xml.head $(top_srcdir)/functions.h $(top_srcdir)/OPS* 
manual.xml.tail \
+               manual.xml.head $(top_srcdir)/functions.h $(OPS) 
manual.xml.tail \
                $(srcdir)/gen-map-doc $(top_srcdir)/VERSION 
$(top_srcdir)/ChangeLog
        ( date=`head -n 1 $(top_srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 1` 
&& \
          sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` ($$date)/" 
$(srcdir)/manual.xml.head && \
          $(MAKEDOC_CPP) $(top_srcdir)/init.h | ./makedoc$(EXEEXT) -s && \
          $(MAKEDOC_CPP) $(top_srcdir)/functions.h | \
-           perl $(srcdir)/gen-map-doc $(srcdir)/manual.xml.tail 
$(top_srcdir)/OPS* \
+           perl $(srcdir)/gen-map-doc $(srcdir)/manual.xml.tail $(OPS) \
        ) > manual.xml
        touch stamp-doc-xml
 # Tell versions [3.59,3.63) of GNU make to not export all variables.