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

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



On Wednesday, March 19 at 09:05 PM, quoth N.J. Mann:
--- 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
+

NO. This variable is already constructed by the configure script (its contents depend on how mutt is configured). You could do this:

    OPS = @OPS@

... though that's technically redundant.

The configure script, or more accurately the configure.ac file, has a minor problem, which is that it uses $(srcdir) instead of $(top_srcdir).

The problem here is that we don't want the *DOCUMENTATION* to depend on how mutt is configured. What you probably want to do is construct a new variable... say DOC_OPS or something like that, which will list all of the OPS files independent of the configuration.

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 \

The problem here is that OPS is defined in the configure scirpt, and has a meaning other than what you're doing here.

               $(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

Same problem. Use DOC_OPS or something like that.

        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@

NO. Do *NOT* edit auto-generated files (such as Makefile.in -- automake generates Makefile.in based on the contents of the Makefile.am file). Makefile.in isn't even in the source repository---it's built when you run the `prepare` script.

~Kyle
--
The criterion of truth is that it works even if nobody is prepared to acknowledge it.
                                                   -- Ludwig von Mises

Attachment: pgpm0I8MROxVY.pgp
Description: PGP signature