chiark / gitweb /
Makefile for manual page installation. Subtle and complicated.
authormdw <mdw>
Tue, 6 Jul 1999 19:14:22 +0000 (19:14 +0000)
committermdw <mdw>
Tue, 6 Jul 1999 19:14:22 +0000 (19:14 +0000)
man/Makefile.m4 [new file with mode: 0644]

diff --git a/man/Makefile.m4 b/man/Makefile.m4
new file mode 100644 (file)
index 0000000..b8a826b
--- /dev/null
@@ -0,0 +1,69 @@
+## -*-makefile-*-
+##
+## $Id: Makefile.m4,v 1.1 1999/07/06 19:14:22 mdw Exp $
+##
+## Makefile for mLib's manual pages
+##
+## (c) 1999 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of the mLib utilities library.
+##
+## mLib is free software; you can redistribute it and/or modify
+## it under the terms of the GNU Library General Public License as
+## published by the Free Software Foundation; either version 2 of the
+## License, or (at your option) any later version.
+## 
+## mLib is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU Library General Public License for more details.
+## 
+## You should have received a copy of the GNU Library General Public
+## License along with mLib; if not, write to the Free
+## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+## MA 02111-1307, USA.
+
+##----- Revision history ----------------------------------------------------
+##
+## $Log: Makefile.m4,v $
+## Revision 1.1  1999/07/06 19:14:22  mdw
+## Makefile for manual page installation.  Subtle and complicated.
+##
+
+AUTOMAKE_OPTIONS = foreign
+
+dnl --- Read in the various lists of things ---
+
+define(`nl', `
+')
+define(`joinlines', `patsubst(patsubst(`$1', nl$, `'), nl, `$2')')
+define(`filenonl', `\nl        $2`'joinlines(include(`$1'), ` \\'nl`   $2')')
+define(`TOPLEVEL', filenonl(`toplevel'))
+define(`LINKS', filenonl(`links'))
+define(`SRC_TOPLEVEL', filenonl(`toplevel', `$(srcdir)/'))
+define(`SRC_LINKS', filenonl(`links', `$(srcdir)/'))
+
+## --- Manual pages ---
+
+man_MANS = TOPLEVEL LINKS
+
+EXTRA_DIST = $(man_MANS) mksofiles links toplevel
+
+## --- Various maintenance rules ---
+
+MAINTAINERCLEANFILES = SRC_LINKS $(srcdir)/Makefile.am $(srcdir)/stamp-so.in
+
+$(srcdir)/links $(srcdir)/toplevel: stamp-so.in
+
+$(srcdir)/stamp-so.in: TOPLEVEL
+       cd $(srcdir); ./mksofiles *.[1-9]
+       touch $(srcdir)/stamp-so.in
+
+$(srcdir)/Makefile.am: \
+       $(srcdir)/Makefile.m4 $(srcdir)/links $(srcdir)/toplevel
+       cd $(srcdir); m4 Makefile.m4 >Makefile.am
+
+##----- That's all, folks ---------------------------------------------------