chiark / gitweb /
Makefile for manual page installation. Subtle and complicated.
[mLib] / man / Makefile.m4
1 ## -*-makefile-*-
2 ##
3 ## $Id: Makefile.m4,v 1.1 1999/07/06 19:14:22 mdw Exp $
4 ##
5 ## Makefile for mLib's manual pages
6 ##
7 ## (c) 1999 Straylight/Edgeware
8 ##
9
10 ##----- Licensing notice ----------------------------------------------------
11 ##
12 ## This file is part of the mLib utilities library.
13 ##
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.
18 ## 
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.
23 ## 
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.
28
29 ##----- Revision history ----------------------------------------------------
30 ##
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.
34 ##
35
36 AUTOMAKE_OPTIONS = foreign
37
38 dnl --- Read in the various lists of things ---
39
40 define(`nl', `
41 ')
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)/'))
48
49 ## --- Manual pages ---
50
51 man_MANS = TOPLEVEL LINKS
52
53 EXTRA_DIST = $(man_MANS) mksofiles links toplevel
54
55 ## --- Various maintenance rules ---
56
57 MAINTAINERCLEANFILES = SRC_LINKS $(srcdir)/Makefile.am $(srcdir)/stamp-so.in
58
59 $(srcdir)/links $(srcdir)/toplevel: stamp-so.in
60
61 $(srcdir)/stamp-so.in: TOPLEVEL
62         cd $(srcdir); ./mksofiles *.[1-9]
63         touch $(srcdir)/stamp-so.in
64
65 $(srcdir)/Makefile.am: \
66         $(srcdir)/Makefile.m4 $(srcdir)/links $(srcdir)/toplevel
67         cd $(srcdir); m4 Makefile.m4 >Makefile.am
68
69 ##----- That's all, folks ---------------------------------------------------