X-Git-Url: https://git.distorted.org.uk/~mdw/runlisp/blobdiff_plain/a78556293853d334ace051def729082fa787e6e9..47a219e85c4215cea80c75ed9b26ed7dc404a8e2:/Makefile.am diff --git a/Makefile.am b/Makefile.am index 93c225c..b13d107 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,92 +1,204 @@ -## Process this file with Automake to generate `Makefile.in' -## -*-Makefile-*- -## -## $Id: Makefile.am,v 1.6 2003/09/24 22:45:57 mdw Exp $ -## -## Building the distribution -## -## (c) 1997 Mark Wooding -## - -##----- Licensing notice ---------------------------------------------------- -## -## This file is part of the Common Files Distribution (`common') -## -## `Common' 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. -## -## `Common' 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 `common'; 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.6 2003/09/24 22:45:57 mdw -## Support Automake's `aclocal' scheme. Deposit Autoconf fragments in -## `aclocal's' repository. Apply heinous bodging to `txtlib' and -## `mkaclocal'. -## -## Revision 1.5 2003/05/15 23:39:15 mdw -## Distribute `maninst' script -## -## Revision 1.4 2003/04/05 09:12:13 mdw -## Tool for installing manpages. -## -## Revision 1.3 2000/08/15 21:37:06 mdw -## New common library configuration skeleton, filled in by configure.in. -## Replaces mLib-config etc. -## -## Revision 1.2 1999/05/17 20:43:49 mdw -## Add getdate implementation. -## -## Revision 1.1.1.1 1999/05/05 19:23:47 mdw -## New import. The old CVS repository was lost in a disk disaster. -## - -## --- Options --- - -AUTOMAKE_OPTIONS = foreign - -## --- What needs building --- - -bin_SCRIPTS = mklinks findlinks txtlib mkaclocal - -## --- Files to install in the repository --- - -pkgdata_DATA = \ - COPYING COPYING.LIB INSTALL \ - ansi2knr.1 ansi2knr.c \ - gpl.tex lgpl.tex gpl.texi lgpl.texi texinfo.tex texinice.tex \ - lib-config.in \ - mdwopt.c mdwopt.h \ - getdate.y getdate.h - -EXTRA_DIST = $(pkgdata_DATA) $(NEWSCRIPTS) - -pkgdata_SCRIPTS = \ - config.guess config.sub elisp-comp install-sh \ - mdate-sh missing mkinstalldirs ylwrap $(NEWSCRIPTS) - -NEWSCRIPTS = \ - maninst - -install-data-hook: - $(srcdir)/install-ac install $(srcdir)/aclocal.glob $(aclocaldir) -uninstall-hook: - $(srcdir)/install-ac rm $(srcdir)/aclocal.glob $(aclocaldir) - -## --- Documentation --- - -info_TEXINFOS = common.texi - -## --- Cleaning up --- - -CLEANFILES = $(bin_SCRIPTS) +### -*-makefile-*- +### +### Build script for `runlisp' +### +### (c) 2020 Mark Wooding +### + +###----- Licensing notice --------------------------------------------------- +### +### This file is part of Runlisp, a tool for invoking Common Lisp scripts. +### +### Runlisp 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 3 of the License, or (at your +### option) any later version. +### +### Runlisp 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 Runlisp. If not, see . + +include $(top_srcdir)/vars.am + +SUBDIRS = + +image_DATA = +image_SCRIPTS = + +SUBDIRS += . + +ACLOCAL_AMFLAGS = -Im4 + +###-------------------------------------------------------------------------- +### A library of common code. + +noinst_LIBRARIES += librunlisp.a +librunlisp_a_SOURCES = + +librunlisp_a_SOURCES += common.c common.h +librunlisp_a_SOURCES += lib.c lib.h +librunlisp_a_SOURCES += mdwopt.c mdwopt.h +librunlisp_a_SOURCES += sha256.c sha256.h + +###-------------------------------------------------------------------------- +### The main driver program. + +bin_PROGRAMS += runlisp +runlisp_SOURCES = runlisp.c +runlisp_LDADD = librunlisp.a +man_MANS += runlisp.1 +doc_DATA += runlisp.pdf +EXTRA_DIST += runlisp.1.in + +###-------------------------------------------------------------------------- +### Additional machinery. + +pkgdata_DATA += eval.lisp +EXTRA_DIST += eval.lisp + +pkgdata_SCRIPTS += dump-ecl +EXTRA_DIST += dump-ecl + +bin_PROGRAMS += query-runlisp-config +query_runlisp_config_SOURCES = query-runlisp-config.c +query_runlisp_config_LDADD = librunlisp.a +man_MANS += query-runlisp-config.1 +doc_DATA += query-runlisp-config.pdf +EXTRA_DIST += query-runlisp-config.1.in + +man_MANS += runlisp.conf.5 +doc_DATA += runlisp.conf.pdf +EXTRA_DIST += runlisp.conf.5.in + +EXTRA_DIST += runlisp-base.conf +install-data-hook:: + $(MKDIR_P) $(DESTDIR)$(pkgconfdir)/runlisp.d + cp $(srcdir)/runlisp-base.conf \ + $(DESTDIR)$(pkgconfdir)/runlisp.d/0base.conf +uninstall-hook:: + rm -f $(DESTDIR)$(pkgconfdir)/runlisp.d/0base.conf + +EXTRA_DIST += runlisp.conf +install-data-hook:: + $(MKDIR_P) $(DESTDIR)$(pkgconfdir) + if ! [ -f $(DESTDIR)$(pkgconfdir)/runlisp.conf ]; then \ + cp $(srcdir)/runlisp.conf $(DESTDIR)$(pkgconfdir)/; \ + fi +uninstall-hook:: + rm -f $(DESTDIR)$(pkgconfdir)/runlisp.conf + +###-------------------------------------------------------------------------- +### Image dumping. + +bin_PROGRAMS += dump-runlisp-image +dump_runlisp_image_SOURCES = dump-runlisp-image.c +dump_runlisp_image_LDADD = librunlisp.a +man_MANS += dump-runlisp-image.1 +doc_DATA += dump-runlisp-image.pdf +EXTRA_DIST += dump-runlisp-image.1.in + +DUMP_RUNLISP_IMAGE = $(v_dump)\ + ASDF_OUTPUT_TRANSLATIONS='( \ + :output-translations \ + :ignore-inherited-configuration \ + (t ("$(abs_builddir)/" "fasl/" \ + :implementation-type :**/ :*.*.*)))' \ + ./dump-runlisp-image -f -O$@ \ + -c$(srcdir)/runlisp-base.conf \ + -odata-dir=$(srcdir) +clean-local::; rm -fr fasl + +v_dump = $(v_dump_@AM_V@) +v_dump_ = $(v_dump_@AM_DEFAULT_V@) +v_dump_0 = @echo " DUMP $@"; + +IMAGES = +noinst_DATA += $(IMAGES) + +if DUMP_SBCL +IMAGES += sbcl+asdf.core +CLEANFILES += sbcl+asdf.core sbcl+asdf.core-* +sbcl+asdf.core: dump-runlisp-image runlisp-base.conf + $(DUMP_RUNLISP_IMAGE) sbcl +endif + +if DUMP_CCL +IMAGES += ccl+asdf.image +CLEANFILES += ccl+asdf.image ccl+asdf.image-* +ccl+asdf.image: dump-runlisp-image runlisp-base.conf + $(DUMP_RUNLISP_IMAGE) ccl +endif + +if DUMP_CLISP +IMAGES += clisp+asdf.mem +CLEANFILES += clisp+asdf.mem clisp+asdf.mem-* +clisp+asdf.mem: dump-runlisp-image runlisp-base.conf + $(DUMP_RUNLISP_IMAGE) clisp +endif + +if DUMP_ECL +IMAGES += ecl+asdf +CLEANFILES += ecl+asdf ecl+asdf-* +ecl+asdf: dump-runlisp-image runlisp-base.conf dump-ecl + $(DUMP_RUNLISP_IMAGE) -odata-dir=$(srcdir) ecl +endif + +if DUMP_CMUCL +IMAGES += cmucl+asdf.core +CLEANFILES += cmucl+asdf.core cmucl+asdf.core-* +cmucl+asdf.core: dump-runlisp-image runlisp-base.conf + $(DUMP_RUNLISP_IMAGE) cmucl +endif + +install-data-hook:: + mkdir -p $(DESTDIR)$(imagedir) + set -e; for i in $(IMAGES); do \ + j=$$(readlink $$i); \ + cp $$j $(DESTDIR)$(imagedir)/$$j.new && \ + mv $(DESTDIR)$(imagedir)/$$j.new \ + $(DESTDIR)$(imagedir)/$$j; \ + ln -sf $$j $(DESTDIR)$(imagedir)/$$i; \ + done + +uninstall-hook:: + set -e; for i in $(IMAGES); do \ + if j=$$(readlink $(DESTDIR)$(imagedir)/$$i); then \ + case $$j in \ + $$i-*[!0-9a-f]) ;; \ + $$i-*) rm -f $(DESTDIR)$(imagedir)/$$j ;; \ + esac; \ + fi; \ + rm -f $(DESTDIR)$(imagedir)/$$i; \ + done + +###-------------------------------------------------------------------------- +### Other subdirectories. + +## Documentation. +SUBDIRS += doc +EXTRA_DIST += README.org + +## Testing. +SUBDIRS += t + +## Benchmarking. +if BENCHMARK +SUBDIRS += bench +endif + +###-------------------------------------------------------------------------- +### Distribution. + +## Release number. +dist-hook:: + echo $(VERSION) >$(distdir)/RELEASE + +## Additional build tools. +EXTRA_DIST += config/auto-version +EXTRA_DIST += config/confsubst + +###----- That's all, folks --------------------------------------------------