Use p_new instead of xmalloc()
[apps/madmutt.git] / Makefile.am
index a695993..919945d 100644 (file)
@@ -8,7 +8,7 @@ if BUILD_NNTP
 NNTP_SUBDIR = nntp
 endif
 
-SUBDIRS = intl m4 po $(XXXXXXXXXXXX_doc) contrib \
+SUBDIRS = intl m4 po $(XXXXXXXXXXXX_doc) apidoc contrib \
          lib-mime lib-lib lib-mx lib-crypt lib-hash lib-sys lib-ui \
          pop imap $(NNTP_SUBDIR)
 
@@ -84,8 +84,7 @@ pgpewrapng_SOURCES = pgpewrap.c
 pgpewrapng_LDADD = 
 pgpewrapng_DEPENDENCIES = 
 
-CLEANFILES = stamp-doc-rc makedoc \
-       keymap_alldefs.h keymap_defs.h version.h
+CLEANFILES = stamp-doc-rc makedoc keymap_defs.h version.h Madmuttrc
 
 ACLOCAL_AMFLAGS = -I m4
 
@@ -98,8 +97,6 @@ smime_keysng: $(srcdir)/smime_keys.pl
        cp $(srcdir)/smime_keys.pl smime_keysng
        chmod +x smime_keysng
 
-Makefile: $(BUILT_SOURCES)
-
 keymap_defs.h: OPS
        $(srcdir)/gen_defs $^ > keymap_defs.h
 
@@ -117,38 +114,30 @@ install-exec-hook:
                { echo "Can't fix madmutt_dotlock's permissions!" >&2 ; } \
        fi
 
-install-data-local: madmuttrc
+install-data-local: Madmuttrc
        $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
-       -if [ -f $(DESTDIR)$(pkgdatadir)/madmuttrc ] ; then \
-               mv $(DESTDIR)$(pkgdatadir)/madmuttrc* $(DESTDIR)$(sysconfdir) ; \
-       elif [ -f $(DESTDIR)$(pkgdatadir)/../madmuttrc ] ; then \
-               mv $(DESTDIR)$(pkgdatadir)/../madmuttrc* $(DESTDIR)$(sysconfdir) ; \
-       elif [ ! -f $(DESTDIR)$(sysconfdir)/madmuttrc ] ; then \
-               $(INSTALL) -m 644 madmuttrc $(DESTDIR)$(sysconfdir) ; \
+       -if [ -f $(DESTDIR)$(pkgdatadir)/Madmuttrc ] ; then \
+               mv $(DESTDIR)$(pkgdatadir)/Madmuttrc* $(DESTDIR)$(sysconfdir) ; \
+       elif [ -f $(DESTDIR)$(pkgdatadir)/../Madmuttrc ] ; then \
+               mv $(DESTDIR)$(pkgdatadir)/../Madmuttrc* $(DESTDIR)$(sysconfdir) ; \
+       elif [ ! -f $(DESTDIR)$(sysconfdir)/Madmuttrc ] ; then \
+               $(INSTALL) -m 644 Madmuttrc $(DESTDIR)$(sysconfdir) ; \
        fi
        -if [ ! -f $(DESTDIR)$(sysconfdir)/madmutt-mime.types ]; then \
                $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/madmutt-mime.types; \
        fi
 
 
-# kluge around automake problems.
-
-dist-hook:
-       -for file in $(BUILT_SOURCES) ; do rm -f $(distdir)/$$file ; done
-
-mutt-dist:
-       (cd $(srcdir) && ./build-release )
-
 update-doc: stamp-doc-rc
        (cd doc && $(MAKE) update-doc)
 
-madmuttrc: stamp-doc-rc
+Madmuttrc: stamp-doc-rc
 
-stamp-doc-rc: $(srcdir)/init.h makedoc madmuttrc.head
-       -rm -f madmuttrc stamp-doc-rc
+stamp-doc-rc: $(srcdir)/init.h makedoc Madmuttrc.head
+       -rm -f Madmuttrc stamp-doc-rc
        $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
-               $(srcdir)/init.h | ./makedoc -c | cat madmuttrc.head - > madmuttrc
-       touch stamp-doc-rc
+               $(srcdir)/init.h | ./makedoc -c | cat Madmuttrc.head - > Madmuttrc
+       touch $@
 
 
 -include cflags.mk