1 ## Process with `automake' to generate `Makefile.in'
8 ## (c) 1999 Mark Wooding
11 ##----- Licensing notice ----------------------------------------------------
13 ## This file is part of Quine.
15 ## Quine is free software; you can redistribute it and/or modify it
16 ## under the terms of the GNU General Public License as published by
17 ## the Free Software Foundation; either version 2 of the License, or
18 ## (at your option) any later version.
20 ## Quine is distributed in the hope that it will be useful, but
21 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ## GNU General Public License for more details.
25 ## You should have received a copy of the GNU General Public License
26 ## along with Quine; if not, write to the Free Software Foundation,
27 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 ##----- Revision history ----------------------------------------------------
31 ## $Log: Makefile.am,v $
32 ## Revision 1.1 1999/04/28 19:58:07 mdw
36 AUTOMAKE_OPTIONS = foreign
38 ## --- What needs installing ---
41 noinst_PROGRAMS = ansicquine
42 include_HEADERS = quine.h
44 ## --- How to build the program ---
46 quine_SOURCES = quine.c qqout.c mdwopt.c quine.h mdwopt.h
47 ansicquine_SOURCES = ansicquine.c
48 EXTRA_DIST = qqlib.c qqout.c qqlout.c rexxquine.exec bournequine
49 CLEANFILES = xquine yquine
50 MAINTAINERCLEANFILES = qqout.c qqlout.c $(srcdir)/qqout.c $(srcdir)/qqlout.c
52 ## --- I need recursive makeness ---
54 ## In this way, I can rebuild `xquine' and `yquine' only when they really
59 ## --- Some hacking for the bootstrapping process ---
61 ## The outputtable library gets built from `qqlib.c'. I therefore have to
62 ## build a `quine' which can do this. This is `xquine'. Then, I can
63 ## build a `yquine' which is capable of writing full `qqout.c' files, with
64 ## which I can build the final glorious `quine'.
66 xquine: xquine.o qqlib.o mdwopt.o
67 $(LINK) xquine.o qqlib.o mdwopt.o
69 $(COMPILE) -c -DQQ_XQUINE $(srcdir)/quine.c -o xquine.o
71 yquine: yquine.o qqlib.o qqlout.o mdwopt.o
72 $(LINK) yquine.o qqlib.o qqlout.o mdwopt.o
74 $(COMPILE) -c -DQQ_YQUINE $(srcdir)/quine.c -o yquine.o
76 ## --- The `qqlout.c' file ---
78 ## The contents of `qqlib.c' are included in every `qqout.c' file we write.
79 ## But I've got to get it from somewhere so that I can write it to the first
80 ## `qqout.c' file. The solution is, as described above, to use a cut-down
81 ## `quine' program which can just about build `qqlout.c' which contains only
85 if [ -z "$(qq_xquine)" ]; then \
86 $(MAKE) qq_xquine=true xquine; \
88 ./xquine --qqlib $(srcdir)/qqlib.c -o qqlout.c
90 ## --- The `qqout.c' file ---
92 ## This contains the complete source code for the program.
94 qqout.c: quine.c qqlout.c qqlib.c mdwopt.c quine.h mdwopt.h
95 if [ -z "$(qq_yquine)" ]; then \
96 $(MAKE) qq_yquine=true yquine; \
99 -ln qqout.c qqlout.c $(srcdir)
102 find $(distdir) \( -type f -o -type l \) ! -name qqout.c -print | \
103 ./yquine -o $(distdir)/qqout.c
104 ln $(distdir)/qqout.c qqout.c
107 ##----- That's all, folks ---------------------------------------------------