3 ## $Id: Makefile.m4,v 1.1 1999/07/06 19:14:22 mdw Exp $
5 ## Makefile for mLib's manual pages
7 ## (c) 1999 Straylight/Edgeware
10 ##----- Licensing notice ----------------------------------------------------
12 ## This file is part of the mLib utilities library.
14 ## mLib is free software; you can redistribute it and/or modify
15 ## it under the terms of the GNU Library General Public License as
16 ## published by the Free Software Foundation; either version 2 of the
17 ## License, or (at your option) any later version.
19 ## mLib is distributed in the hope that it will be useful,
20 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ## GNU Library General Public License for more details.
24 ## You should have received a copy of the GNU Library General Public
25 ## License along with mLib; if not, write to the Free
26 ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27 ## MA 02111-1307, USA.
29 ##----- Revision history ----------------------------------------------------
31 ## $Log: Makefile.m4,v $
32 ## Revision 1.1 1999/07/06 19:14:22 mdw
33 ## Makefile for manual page installation. Subtle and complicated.
36 AUTOMAKE_OPTIONS = foreign
38 dnl --- Read in the various lists of things ---
42 define(`joinlines', `patsubst(patsubst(`$1', nl$, `'), nl, `$2')')
43 define(`filenonl', `\nl $2`'joinlines(include(`$1'), ` \\'nl` $2')')
44 define(`TOPLEVEL', filenonl(`toplevel'))
45 define(`LINKS', filenonl(`links'))
46 define(`SRC_TOPLEVEL', filenonl(`toplevel', `$(srcdir)/'))
47 define(`SRC_LINKS', filenonl(`links', `$(srcdir)/'))
49 ## --- Manual pages ---
51 man_MANS = TOPLEVEL LINKS
53 EXTRA_DIST = $(man_MANS) mksofiles links toplevel
55 ## --- Various maintenance rules ---
57 MAINTAINERCLEANFILES = SRC_LINKS $(srcdir)/Makefile.am $(srcdir)/stamp-so.in
59 $(srcdir)/links $(srcdir)/toplevel: stamp-so.in
61 $(srcdir)/stamp-so.in: TOPLEVEL
62 cd $(srcdir); ./mksofiles *.[1-9]
63 touch $(srcdir)/stamp-so.in
65 $(srcdir)/Makefile.am: \
66 $(srcdir)/Makefile.m4 $(srcdir)/links $(srcdir)/toplevel
67 cd $(srcdir); m4 Makefile.m4 >Makefile.am
69 ##----- That's all, folks ---------------------------------------------------