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

Re: wildcard in doc/Makefile.{am,in} causes problems when hacking



On Wednesday, March 19 at 09:54 PM, quoth N.J. Mann:
NO. Do *NOT* edit auto-generated files (such as Makefile.in -- automake

Hey!  I _did_ say automake was something I didn't know much about!
Where's your solution?

Sorry, I didn't mean to come off as insulting, I just wanted to be very clear for anyone else reading the list. :)

Of course, any solution to this problem that relies on explicitly listing all the various OPS files is "Yet Another Thing To Maintain", which is probably why a patch like this would never get accepted into the main stream source in the first place... But, that said, here's a patch that I think would be a bit cleaner:


diff -r fdad7b9fa741 doc/Makefile.am
--- a/doc/Makefile.am   Tue Mar 04 22:00:31 2008 -0800
+++ b/doc/Makefile.am   Wed Mar 19 17:16:48 2008 -0500
@@ -1,6 +1,11 @@ subdir = doc
 subdir = doc
DSLROOT = @DSLROOT@
+DOC_OPS = $(top_srcdir)/OPS \
+                 $(top_srcdir)/OPS.SMIME \
+                 $(top_srcdir)/OPS.CRYPT \
+                 $(top_srcdir)/OPS.MIX \
+                 $(top_srcdir)/OPS.PGP
DEFS = -DSYSCONFDIR=\"$(sysconfdir)\" -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
 AM_CPPFLAGS = -I. -I.. -I$(includedir) -I$(top_srcdir)
@@ -160,12 +165,12 @@ mutt.1: $(srcdir)/mutt.man
        $(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 $(DOC_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 $(DOC_OPS) \
        ) > manual.xml
        touch stamp-doc-xml


~Kyle
--
However many holy words you read, However many you speak, what good will they do you If you do not act on upon them?
                                                             -- Buddha

Attachment: pgpQufrAPsds6.pgp
Description: PGP signature