## Process with `automake' to generate `Makefile.in' ## -*-makefile-*- ## ## $Id: Makefile.am,v 1.1 1999/04/28 19:58:07 mdw Exp $ ## ## Makefile for Quine ## ## (c) 1999 Mark Wooding ## ##----- Licensing notice ---------------------------------------------------- ## ## This file is part of Quine. ## ## Quine is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## Quine 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 General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Quine; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ##----- Revision history ---------------------------------------------------- ## ## $Log: Makefile.am,v $ ## Revision 1.1 1999/04/28 19:58:07 mdw ## Initial revision ## AUTOMAKE_OPTIONS = foreign ## --- What needs installing --- bin_PROGRAMS = quine noinst_PROGRAMS = ansicquine include_HEADERS = quine.h ## --- How to build the program --- quine_SOURCES = quine.c qqout.c mdwopt.c quine.h mdwopt.h ansicquine_SOURCES = ansicquine.c EXTRA_DIST = qqlib.c qqout.c qqlout.c rexxquine.exec bournequine CLEANFILES = xquine yquine MAINTAINERCLEANFILES = qqout.c qqlout.c $(srcdir)/qqout.c $(srcdir)/qqlout.c ## --- I need recursive makeness --- ## ## In this way, I can rebuild `xquine' and `yquine' only when they really ## get needed. @SET_MAKE@ ## --- Some hacking for the bootstrapping process --- ## ## The outputtable library gets built from `qqlib.c'. I therefore have to ## build a `quine' which can do this. This is `xquine'. Then, I can ## build a `yquine' which is capable of writing full `qqout.c' files, with ## which I can build the final glorious `quine'. xquine: xquine.o qqlib.o mdwopt.o $(LINK) xquine.o qqlib.o mdwopt.o xquine.o: quine.c $(COMPILE) -c -DQQ_XQUINE $(srcdir)/quine.c -o xquine.o yquine: yquine.o qqlib.o qqlout.o mdwopt.o $(LINK) yquine.o qqlib.o qqlout.o mdwopt.o yquine.o: quine.c $(COMPILE) -c -DQQ_YQUINE $(srcdir)/quine.c -o yquine.o ## --- The `qqlout.c' file --- ## ## The contents of `qqlib.c' are included in every `qqout.c' file we write. ## But I've got to get it from somewhere so that I can write it to the first ## `qqout.c' file. The solution is, as described above, to use a cut-down ## `quine' program which can just about build `qqlout.c' which contains only ## the library. qqlout.c: qqlib.c if [ -z "$(qq_xquine)" ]; then \ $(MAKE) qq_xquine=true xquine; \ else :; fi ./xquine --qqlib $(srcdir)/qqlib.c -o qqlout.c ## --- The `qqout.c' file --- ## ## This contains the complete source code for the program. qqout.c: quine.c qqlout.c qqlib.c mdwopt.c quine.h mdwopt.h if [ -z "$(qq_yquine)" ]; then \ $(MAKE) qq_yquine=true yquine; \ else :; fi touch qqout.c -ln qqout.c qqlout.c $(srcdir) $(MAKE) distdir rm qqout.c find $(distdir) \( -type f -o -type l \) ! -name qqout.c -print | \ ./yquine -o $(distdir)/qqout.c ln $(distdir)/qqout.c qqout.c rm -rf $(distdir) ##----- That's all, folks ---------------------------------------------------