]> granicus.if.org Git - mutt/commitdiff
Long-overdue build system overhaul.
authorMatthias Andree <matthias.andree@gmx.de>
Tue, 18 Jul 2006 18:04:14 +0000 (18:04 +0000)
committerMatthias Andree <matthias.andree@gmx.de>
Tue, 18 Jul 2006 18:04:14 +0000 (18:04 +0000)
13 files changed:
Makefile.am
build-release
contrib/.cvsignore
contrib/Makefile.am [new file with mode: 0644]
contrib/Makefile.in [deleted file]
doc/.cvsignore
doc/Makefile.am [moved from doc/Makefile.in with 73% similarity]
imap/Makefile.am
m4/Makefile.am [new file with mode: 0644]
m4/Makefile.am.in [deleted file]
m4/README
po/Makefile.in.in
prepare

index 9dcbb1e3822436d8c7c5fc8c8778b441acf31fc9..5340f5aac437d609627af56a4f8c0f138966682a 100644 (file)
@@ -18,7 +18,7 @@ BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h
 bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
 mutt_SOURCES = $(BUILT_SOURCES) \
        addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c \
-        crypt.c cryptglue.c \
+       crypt.c cryptglue.c \
        commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \
        edit.c enter.c flags.c init.c filter.c from.c \
        getdomain.c group.c \
@@ -42,7 +42,7 @@ makedoc_LDADD =
 makedoc_DEPENDENCIES = 
 
 # $(makedoc_OBJECTS): $(makedoc_SOURCES)
-#      $(HOST_CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) -c $<
+#      $(HOST_CC) $(DEFS) $(AM_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) -c $<
 
 # makedoc: $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES)
 #      @rm -rf makedoc
@@ -54,7 +54,7 @@ DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
        -DHAVE_CONFIG_H=1
 
-INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
+AM_CPPFLAGS=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
 
 CPPFLAGS=@CPPFLAGS@ -I$(includedir)
 
@@ -99,6 +99,8 @@ CLEANFILES = mutt_dotlock.c stamp-doc-rc makedoc \
        keymap_alldefs.h keymap_defs.h patchlist.c \
        reldate.h
 
+DISTCLEANFILES= flea Muttrc smime_keys
+
 ACLOCAL_AMFLAGS = -I m4
 
 LDADD = @LIBOBJS@ @INTLLIBS@
@@ -113,12 +115,12 @@ smime_keys: $(srcdir)/smime_keys.pl
        cp $(srcdir)/smime_keys.pl smime_keys
        chmod +x smime_keys
 
-Makefile: $(BUILT_SOURCES)
-
 keymap_defs.h: $(OPS) $(srcdir)/gen_defs
        $(srcdir)/gen_defs $(OPS) > keymap_defs.h
 
-keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
+$(srcdir)/keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
+       chmod u+w $(srcdir)
+       rm -f $@
        $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \
                $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
                        > $(srcdir)/keymap_alldefs.h
@@ -142,6 +144,8 @@ install-exec-hook:
 
 install-data-local: Muttrc
        $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
+       $(INSTALL) -m644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist
+       $(INSTALL) -m644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist
        -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \
                mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \
        elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttrc ] ; then \
@@ -153,6 +157,13 @@ install-data-local: Muttrc
                $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \
        fi
 
+uninstall-local:
+       for i in Muttrc mime.types ; do \
+               if cmp -s $(DESTDIR)$(sysconfdir)/$$i.dist $(DESTDIR)$(sysconfdir)/$$i ; then \
+                       rm $(DESTDIR)$(sysconfdir)/$$i ; \
+               fi ; \
+               rm $(DESTDIR)$(sysconfdir)/$${i}.dist ; \
+       done
 
 # Don't make this one ChangeLog - it's intended to be
 # used manually.
@@ -192,7 +203,7 @@ Muttrc: stamp-doc-rc
 
 stamp-doc-rc: $(srcdir)/init.h makedoc Muttrc.head
        -rm -f Muttrc stamp-doc-rc
-       $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
+       $(CPP) $(AM_CPPFLAGS) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
                $(srcdir)/init.h | ./makedoc -c | cat Muttrc.head - > Muttrc
        touch stamp-doc-rc
 
index 8f5bac583d06181de22929ddd35ec0419ad97e01..41a38750b2cc36022f67273d748f0d8922288881 100755 (executable)
@@ -50,7 +50,6 @@ make update-changelog
 
 # now, prepare the distribution tar balls
 
-(cd m4 && rm -f Makefile Makefile.in Makefile.am && make -f Makefile.am.in)
 automake
 touch configure.in
 make config.status
index f3c7a7c5da68804a1bdf391127ba34aed33c3cca..282522db0342d8750454b3dc162493b5fc709cc8 100644 (file)
@@ -1 +1,2 @@
 Makefile
+Makefile.in
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
new file mode 100644 (file)
index 0000000..363e792
--- /dev/null
@@ -0,0 +1,39 @@
+# $Id$
+
+subdir = contrib
+
+SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
+       sample.muttrc  sample.mailcap sample.muttrc-tlr \
+       colors.default colors.linux smime.rc \
+       ca-bundle.crt smime_keys_test.pl
+
+EXTRA_DIST = language.txt language50.txt  \
+       patch.slang-1.2.2.keypad.1      \
+       $(SAMPLES) \
+       iconv/README \
+       iconv/make.sh
+
+install-data-local:
+       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)/samples $(DESTDIR)$(docdir)/samples/iconv
+       for f in $(SAMPLES) ; do \
+               $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir)/samples ;   \
+       done
+       for f in $(srcdir)/iconv/*.rc ; do                                      \
+               $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/samples/iconv   ;     \
+       done
+
+uninstall-local:
+       for f in $(SAMPLES) ; do \
+               rm -f $(DESTDIR)$(docdir)/samples/$$f ; \
+       done
+       -rm -rf $(DESTDIR)$(docdir)/samples/iconv
+       -rmdir $(DESTDIR)$(docdir)/samples
+       -rmdir $(DESTDIR)$(docdir)
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist-hook: Makefile $(DISTFILES)
+       mkdir -p $(distdir)/iconv
+       for file in $(srcdir)/iconv/*.rc ; do                                   \
+               ln $$file $(distdir)/iconv 2> /dev/null                         \
+                       || cp -p $$file $(distdir)/iconv ;                      \
+       done
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
deleted file mode 100644 (file)
index df234ba..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-# $Id$
-
-SHELL = /bin/sh
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-datarootdir = @datarootdir@
-mandir = @mandir@
-srcdir = @srcdir@
-docdir = @docdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-INSTALL = @INSTALL@
-VPATH = @srcdir@
-@SET_MAKE@
-
-subdir = contrib
-
-SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
-       sample.muttrc  sample.mailcap sample.muttrc-tlr \
-       colors.default colors.linux smime.rc \
-       ca-bundle.crt smime_keys_test.pl
-
-DISTFILES = Makefile.in language.txt language50.txt  \
-       patch.slang-1.2.2.keypad.1      \
-       $(SAMPLES)
-
-ICONV_DISTFILES = README make.sh
-
-all clean:
-
-distclean:
-       -rm -f Makefile
-
-check:
-
-install:
-       $(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)/samples $(DESTDIR)$(docdir)/samples/iconv
-       for f in $(SAMPLES) ; do \
-               $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir)/samples ;   \
-       done
-       for f in $(srcdir)/iconv/*.rc ; do                                      \
-               $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/samples/iconv   ;     \
-       done
-
-uninstall:
-       for f in $(SAMPLES) ; do \
-               rm -f $(DESTDIR)$(docdir)/samples/$$f ; \
-       done
-       -rm -rf $(DESTDIR)$(docdir)/samples/iconv
-       -rmdir $(DESTDIR)$(docdir)/samples
-       -rmdir $(DESTDIR)$(docdir)
-
-maintainer-clean: distclean
-
-Makefile: ../config.status Makefile.in
-       cd .. \
-         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: Makefile $(DISTFILES)
-       for file in $(DISTFILES) ; do                           \
-               ln $(srcdir)/$$file $(distdir) 2> /dev/null     \
-                       || cp -p $(srcdir)/$$file $(distdir);   \
-       done
-       mkdir -p $(distdir)/iconv
-       for file in $(ICONV_DISTFILES) ; do                                     \
-               ln $(srcdir)/iconv/$$file $(distdir)/iconv 2> /dev/null         \
-                       || cp -p $(srcdir)/iconv/$$file $(distdir)/iconv;       \
-       done
-       for file in $(srcdir)/iconv/*.rc ; do                                   \
-               ln $$file $(distdir)/iconv 2> /dev/null                         \
-                       || cp -p $$file $(distdir)/iconv ;                      \
-       done
index 0e86a3c5cb2c7a275ad614feb19dd26f2973b58f..a811a00aca670c38e94c527abd5696db389c738c 100644 (file)
@@ -1,4 +1,5 @@
 Makefile
+Makefile.in
 *.html
 muttrc.man
 mutt.1
similarity index 73%
rename from doc/Makefile.in
rename to doc/Makefile.am
index f5fcbf7f60958dbb58d1afa9cd9a27aba0619131..f97f83e33562b3fb3891ec7d6ff5ce1b1faff54a 100644 (file)
@@ -1,44 +1,15 @@
 # $Id$
 
-SHELL = /bin/sh
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datarootdir = @datarootdir@
-sysconfdir = @sysconfdir@
-bindir = @bindir@
-libdir = @libdir@
-mandir = @mandir@
-srcdir = @srcdir@
-docdir = @docdir@
-includedir  =  @includedir@
-top_srcdir=@top_srcdir@
-top_builddir = ..
-VPATH = @srcdir@
-@SET_MAKE@
-
-INSTALL = @INSTALL@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-XCPPFLAGS = -I. @CPPFLAGS@
-CFLAGS = @CFLAGS@ $(XCPPFLAGS)
-LDFLAGS = @LDFLAGS@
 subdir = doc
 
-CPPFLAGS = @CPPFLAGS@
-
 DSLROOT = @DSLROOT@
 
 DEFS = -DSYSCONFDIR=\"$(sysconfdir)\" -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
-INCLUDES = -I. -I.. -I$(includedir) -I$(top_srcdir)
+AM_CPPFLAGS = -I. -I.. -I$(includedir) -I$(top_srcdir)
 
-MAKEDOC_CPP = $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C 
+MAKEDOC_CPP = $(CPP) $(AM_CPPFLAGS) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C
 
-DISTFILES = Makefile.in dotlock.man    \
+EXTRA_DIST = dotlock.man               \
        muttbug.man                     \
        mutt.man                        \
        PGP-Notes.txt                   \
@@ -53,7 +24,7 @@ DISTFILES = Makefile.in dotlock.man   \
        instdoc.sh.in                   \
        patch-notes.txt                 \
        smime-notes.txt                 \
-       html.xsl chunk.xsl
+       html.xsl chunk.xsl $(BUILT_DISTFILES)
 
 HTML_DOCFILES = manual.html index.html intro.html gettingstarted.html \
        configuration.html mimesupport.html advancedusage.html \
@@ -73,7 +44,7 @@ all: ../makedoc$(EXEEXT)
 
 makedoc-all: mutt.1 muttrc.man manual.html stamp-doc-chunked manual.txt
 
-install: makedoc-all instdoc
+install-data-local: makedoc-all instdoc
        $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
        $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man5
        ./instdoc mutt.1 $(DESTDIR)$(mandir)/man1/mutt.1
@@ -96,7 +67,7 @@ install: makedoc-all instdoc
                $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; \
        done
 
-uninstall:
+uninstall-local:
        for f in mutt.1 mutt_dotlock.1 flea.1 muttbug.1 ; do \
                rm -f $(DESTDIR)$(mandir)/man1/$$f ; \
        done
@@ -128,42 +99,16 @@ manual.tex: stamp-doc-xml
          openjade -t tex -D $(DSLROOT) -d print/docbook.dsl dtds/decls/xml.dcl manual.xml; \
        fi
 
-clean
+clean-local:
        rm -f *~ *.html *.orig *.rej  stamp-doc-* *.ps mutt.1 muttrc.man
        rm -f *.aux *.log *.tex *.out
 
-clean-real:
-       rm -f manual.txt manual.html manual.xml manual.pdf
-       rm -rf html
-
-maintainer-clean: clean clean-real distclean
-
-distclean: clean
-       rm -f Makefile
-
-Makefile: Makefile.in ../config.status
-       cd .. \
-         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+DISTCLEANFILES=manual.txt manual.html manual.xml manual.pdf html instdoc
 
 instdoc: instdoc.sh
        cat instdoc.sh > instdoc
        chmod a+x instdoc
 
-instdoc.sh: instdoc.sh.in ../config.status
-       cd .. \
-         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: Makefile $(DISTFILES)
-       for file in $(DISTFILES) ; do                           \
-               ln $(srcdir)/$$file $(distdir) 2> /dev/null     \
-                       || cp -p $(srcdir)/$$file $(distdir);   \
-       done
-       for file in $(BUILT_DISTFILES) ; do       \
-               ln $$file $(distdir) 2> /dev/null \
-               || cp -p $$file $(distdir) ;      \
-       done
-
 ../makedoc$(EXEEXT): $(top_srcdir)/makedoc.c
        (cd .. && $(MAKE) makedoc$(EXEEXT))
 
index 9c86f4f721282261fbba6a266ab1bea0c0911c5e..7a1a42975c314e38828732040319468be8d9e0c5 100644 (file)
@@ -16,7 +16,7 @@ endif
 
 EXTRA_DIST = BUGS README TODO auth_anon.c auth_cram.c auth_gss.c auth_sasl.c
 
-INCLUDES = -I$(top_srcdir) -I../intl
+AM_CPPFLAGS = -I$(top_srcdir) -I../intl
 
 noinst_LIBRARIES = libimap.a
 noinst_HEADERS = auth.h imap_private.h message.h
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644 (file)
index 0000000..26eb235
--- /dev/null
@@ -0,0 +1,6 @@
+EXTRA_DIST = README
+
+dist-hook:
+       for i in $(srcdir)/*.m4 ; do \
+               echo cp -p $$i $(distdir) ; \
+       done
diff --git a/m4/Makefile.am.in b/m4/Makefile.am.in
deleted file mode 100644 (file)
index d4802c3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
-
-##m4-files-begin
-##m4-files-end
-
-Makefile.am: Makefile.am.in
-       rm -f $@ $@t
-       sed -n '1,/^##m4-files-begin/p' Makefile.am.in > $@t
-       ( (echo EXTRA_DIST = README Makefile.am.in | tr '\012' @); \
-         (echo *.m4|tr ' ' @) ) \
-         |sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
-         >> $@t
-       sed -n '/^##m4-files-end/,$$p' Makefile.am.in >> $@t
-       chmod a-w $@t
-       mv $@t $@
index 5e9b3a898c664b3005556e09c1d3f0824042fcf0..ac32e284a26aca4d081d2d6e1a684c52ed2bbf64 100644 (file)
--- a/m4/README
+++ b/m4/README
@@ -2,7 +2,3 @@ These files are used by a program called aclocal (part of the GNU automake
 package).  aclocal uses these files to create aclocal.m4 which is in turn
 used by autoconf to create the configure script at the the top level in
 this distribution.
-
-The Makefile.am file in this directory is automatically generated
-from the template file, Makefile.am.in.
-
index 09fb703583329a7776fd61d4f55437201e6e5431..b31ff82858d5c87a429065c3745dd6199e669123 100644 (file)
@@ -86,6 +86,8 @@ $(top_srcdir)/keymap_alldefs.h:
 # have been downloaded.
 
 $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
+       chmod u+w $(srcdir)
+       rm -f $@
        $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
          --add-comments --keyword=_ --keyword=N_ \
          --files-from=$(srcdir)/POTFILES.in \
diff --git a/prepare b/prepare
index b382ef086a27e4b6ba9d1dc96d1946a59a98c35a..fc9c44e2c093dbcf66e7c11082811b21d57292dd 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -7,7 +7,7 @@ else
   include_deps="-i"
 fi
 
-if aclocal -I m4 && autoheader && (cd m4 && make -f Makefile.am.in ) \
+if aclocal -I m4 && autoheader \
   && automake $include_deps && autoconf && ./configure "$@"
 then
   echo