From 5d69b0a4023ee0caecad7c116a2f2aaf68aed5de Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 26 Nov 2023 17:27:07 +0900 Subject: [PATCH] Automake --- .gitignore | 65 +++++++ AUTHORS | 3 + ChangeLog | 0 HACKING | 37 ++++ Makefile.am | 103 ++++++++++ NEWS | 14 ++ README | 1 + README.org | 4 + boot.scm | 27 --- build-aux/test-driver.scm | 179 ++++++++++++++++++ configure.ac | 39 ++++ doc/vouivre.texi | 60 ++++++ base.scm => examples/base.scm | 10 +- guix.scm | 36 ++++ hall.scm | 69 +++++++ .../vouivre/compile-tree-il.scm | 0 .../vouivre/decompile-tree-il.scm | 0 spec.scm => language/vouivre/spec.scm | 0 pre-inst-env.in | 13 ++ autodiff-tests.scm => tests/autodiff.scm | 0 curry-tests.scm => tests/curry.scm | 0 vouivre.scm | 0 autodiff.scm => vouivre/autodiff.scm | 0 curry.scm => vouivre/curry.scm | 0 vouivre/hconfig.scm | 23 +++ misc.scm => vouivre/misc.scm | 0 mnist.scm => vouivre/mnist.scm | 0 promises.scm => vouivre/promises.scm | 0 28 files changed, 654 insertions(+), 29 deletions(-) create mode 100644 .gitignore create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 HACKING create mode 100644 Makefile.am create mode 100644 NEWS create mode 120000 README create mode 100644 README.org delete mode 100644 boot.scm create mode 100644 build-aux/test-driver.scm create mode 100644 configure.ac create mode 100644 doc/vouivre.texi rename base.scm => examples/base.scm (98%) create mode 100644 guix.scm create mode 100644 hall.scm rename compile-tree-il.scm => language/vouivre/compile-tree-il.scm (100%) rename decompile-tree-il.scm => language/vouivre/decompile-tree-il.scm (100%) rename spec.scm => language/vouivre/spec.scm (100%) create mode 100644 pre-inst-env.in rename autodiff-tests.scm => tests/autodiff.scm (100%) rename curry-tests.scm => tests/curry.scm (100%) create mode 100644 vouivre.scm rename autodiff.scm => vouivre/autodiff.scm (100%) rename curry.scm => vouivre/curry.scm (100%) create mode 100644 vouivre/hconfig.scm rename misc.scm => vouivre/misc.scm (100%) rename mnist.scm => vouivre/mnist.scm (100%) rename promises.scm => vouivre/promises.scm (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a123e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,65 @@ +*.eps +*.go +*.log +*.pdf +*.png +*.tar.xz +*.tar.gz +*.tmp +*~ +.#* +\#*\# +,* +/ABOUT-NLS +/INSTALL +/aclocal.m4 +/autom4te.cache +/build-aux/ar-lib +/build-aux/compile +/build-aux/config.guess +/build-aux/config.rpath +/build-aux/config.sub +/build-aux/depcomp +/build-aux/install-sh +/build-aux/mdate-sh +/build-aux/missing +/build-aux/test-driver +/build-aux/texinfo.tex +/config.status +/configure +/doc/*.1 +/doc/.dirstamp +/doc/contributing.*.texi +/doc/*.aux +/doc/*.cp +/doc/*.cps +/doc/*.fn +/doc/*.fns +/doc/*.html +/doc/*.info +/doc/*.info-[0-9] +/doc/*.ky +/doc/*.pg +/doc/*.toc +/doc/*.t2p +/doc/*.tp +/doc/*.vr +/doc/*.vrs +/doc/stamp-vti +/doc/version.texi +/doc/version-*.texi +/m4/* +/pre-inst-env +/test-env +/test-tmp +/tests/*.trs +GPATH +GRTAGS +GTAGS +Makefile +Makefile.in +config.cache +stamp-h[0-9] +tmp +/.version +/doc/stamp-[0-9] diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..5dedf35 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Contributors to Vouivre 0.1.0: + + Vouivre Digital Corporation diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..b7de064 --- /dev/null +++ b/HACKING @@ -0,0 +1,37 @@ +# -*- mode: org; coding: utf-8; -*- + +#+TITLE: Hacking Vouivre + +* Requirements + +To build the system you will need: + - autoconf + - automake + - guile + - guix[fn:: This (somewhat big) dependency is used to download the MNIST + dataset automatically. It can be avoided by downloading and extracting both + train-images-idx3-ubyte.gz and train-labels-idx1-ubyte.gz from + [[http://yann.lecun.com/exdb/mnist][the official website]] to a 'mnist' directory at the project's + root, and hacking vouivre/mnist.scm to remove the dependency.] + +* Building + +#+BEGIN_SRC bash + autoreconf -vif + ./configure + make +#+END_SRC + +* Testing + +#+BEGIN_SRC bash + make check +#+END_SRC + +* Installing + +Install the Scheme source code and generated binaries so that Guile can find +them: +#+BEGIN_SRC bash + make install +#+END_SRC diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..3d3a8f6 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,103 @@ +bin_SCRIPTS = examples/example.scm \ + examples/base.scm + +# Handle substitution of fully-expanded Autoconf variables. +do_subst = $(SED) \ + -e 's,[@]GUILE[@],$(GUILE),g' \ + -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \ + -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \ + -e 's,[@]localedir[@],$(localedir),g' + +nodist_noinst_SCRIPTS = pre-inst-env + +GOBJECTS = $(SOURCES:%.scm=%.go) + +moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION) +godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache +ccachedir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache + +nobase_dist_mod_DATA = $(filter-out $(BUILT_SOURCES),$(SOURCES)) $(NOCOMP_SOURCES) +nobase_nodist_mod_DATA = $(BUILT_SOURCES) +nobase_go_DATA = $(GOBJECTS) + +# Make sure source files are installed first, so that the mtime of +# installed compiled files is greater than that of installed source +# files. See +# +# for details. +guile_install_go_files = install-nobase_goDATA +$(guile_install_go_files): install-nobase_dist_modDATA + +GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat +SUFFIXES = .scm .go +.scm.go: + $(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<" + +SOURCES = vouivre.scm \ + language/vouivre/decompile-tree-il.scm \ + language/vouivre/spec.scm \ + language/vouivre/compile-tree-il.scm \ + vouivre/hconfig.scm \ + vouivre/curry.scm \ + vouivre/autodiff.scm \ + vouivre/misc.scm \ + vouivre/promises.scm \ + vouivre/mnist.scm + +TESTS = tests/curry.scm \ + tests/autodiff.scm + +TEST_EXTENSIONS = .scm +SCM_LOG_DRIVER = \ + $(top_builddir)/pre-inst-env \ + $(GUILE) --no-auto-compile -e main \ + $(top_srcdir)/build-aux/test-driver.scm + +# Tell 'build-aux/test-driver.scm' to display only source file names, +# not indivdual test names. +AM_SCM_LOG_DRIVER_FLAGS = --brief=yes + +AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)" + +AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" + +info_TEXINFOS = doc/version.texi \ + doc/vouivre.texi + +EXTRA_DIST = README.org \ + README \ + HACKING \ + COPYING \ + doc/vouivre.info \ + doc/version.info \ + doc/.dirstamp \ + doc/stamp-vti \ + NEWS \ + AUTHORS \ + ChangeLog \ + guix.scm \ + .gitignore \ + hall.scm \ + build-aux/texinfo.tex \ + build-aux/mdate-sh \ + build-aux/test-driver.scm \ + build-aux/missing \ + build-aux/install-sh \ + configure.ac \ + pre-inst-env.in \ + Makefile.am \ + build-aux/test-driver.scm \ + $(TESTS) + +ACLOCAL_AMFLAGS = -I m4 + +AM_DISTCHECK_DVI_TARGET = info # Disable DVI as part of distcheck + +clean-go: + -$(RM) $(GOBJECTS) +.PHONY: clean-go + +CLEANFILES = \ + $(BUILT_SOURCES) \ + $(GOBJECTS) \ + $(TESTS:tests/%.scm=%.log) diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..a635e87 --- /dev/null +++ b/NEWS @@ -0,0 +1,14 @@ +# -*- mode: org; coding: utf-8; -*- + +#+TITLE: Vouivre NEWS – history of user-visible changes +#+STARTUP: content hidestars + +Copyright © (2023) Vouivre Digital Corporation + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + +Please send Vouivre bug reports to admin@vouivredigital.com. + +* Publication at 0.1.0 diff --git a/README b/README new file mode 120000 index 0000000..314e17d --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.org \ No newline at end of file diff --git a/README.org b/README.org new file mode 100644 index 0000000..7b57c19 --- /dev/null +++ b/README.org @@ -0,0 +1,4 @@ +# -*- mode: org; coding: utf-8; -*- + +#+TITLE: README for Vouivre + diff --git a/boot.scm b/boot.scm deleted file mode 100644 index 7b5a52a..0000000 --- a/boot.scm +++ /dev/null @@ -1,27 +0,0 @@ -;;;; Copyright (C) 2023 Vouivre Digital Corporation -;;;; -;;;; This file is part of Vouivre. -;;;; -;;;; Vouivre 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. -;;;; -;;;; Vouivre 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 Vouivre. If not, see . - -(define* (b #:optional test) - (load "misc.scm") - (load "curry.scm") - (load "compile-tree-il.scm") - (load "decompile-tree-il.scm") - (load "spec.scm") - (when test - (load "curry-tests.scm")) - (values)) -(b) diff --git a/build-aux/test-driver.scm b/build-aux/test-driver.scm new file mode 100644 index 0000000..0c555ea --- /dev/null +++ b/build-aux/test-driver.scm @@ -0,0 +1,179 @@ +;;;; test-driver.scm - Guile test driver for Automake testsuite harness + +(define script-version "2019-01-15.13") ;UTC + +;;; Copyright © 2015, 2016 Mathieu Lirzin +;;; Copyright © 2019 Alex Sassmannshausen +;;; +;;; This program 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. +;;; +;;; This program 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 this program. If not, see . + +;;;; Commentary: +;;; +;;; This script provides a Guile test driver using the SRFI-64 Scheme API for +;;; test suites. SRFI-64 is distributed with Guile since version 2.0.9. +;;; +;;; This script is a lightly modified version of the orignal written by +;;; Matthieu Lirzin. The changes make it suitable for use as part of the +;;; guile-hall infrastructure. +;;; +;;;; Code: + +(use-modules (ice-9 getopt-long) + (ice-9 pretty-print) + (srfi srfi-26) + (srfi srfi-64)) + +(define (show-help) + (display "Usage: + test-driver --test-name=NAME --log-file=PATH --trs-file=PATH + [--expect-failure={yes|no}] [--color-tests={yes|no}] + [--enable-hard-errors={yes|no}] [--brief={yes|no}}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] +The '--test-name', '--log-file' and '--trs-file' options are mandatory. +")) + +(define %options + '((test-name (value #t)) + (log-file (value #t)) + (trs-file (value #t)) + (color-tests (value #t)) + (expect-failure (value #t)) ;XXX: not implemented yet + (enable-hard-errors (value #t)) ;not implemented in SRFI-64 + (brief (value #t)) + (help (single-char #\h) (value #f)) + (version (single-char #\V) (value #f)))) + +(define (option->boolean options key) + "Return #t if the value associated with KEY in OPTIONS is 'yes'." + (and=> (option-ref options key #f) (cut string=? <> "yes"))) + +(define* (test-display field value #:optional (port (current-output-port)) + #:key pretty?) + "Display 'FIELD: VALUE\n' on PORT." + (if pretty? + (begin + (format port "~A:~%" field) + (pretty-print value port #:per-line-prefix "+ ")) + (format port "~A: ~S~%" field value))) + +(define* (result->string symbol #:key colorize?) + "Return SYMBOL as an upper case string. Use colors when COLORIZE is #t." + (let ((result (string-upcase (symbol->string symbol)))) + (if colorize? + (string-append (case symbol + ((pass) "") ;green + ((xfail) "") ;light green + ((skip) "") ;blue + ((fail xpass) "") ;red + ((error) "")) ;magenta + result + "") ;no color + result))) + +(define* (test-runner-gnu test-name #:key color? brief? out-port trs-port) + "Return an custom SRFI-64 test runner. TEST-NAME is a string specifying the +file name of the current the test. COLOR? specifies whether to use colors, +and BRIEF?, well, you know. OUT-PORT and TRS-PORT must be output ports. The +current output port is supposed to be redirected to a '.log' file." + + (define (test-on-test-begin-gnu runner) + ;; Procedure called at the start of an individual test case, before the + ;; test expression (and expected value) are evaluated. + (let ((result (cute assq-ref (test-result-alist runner) <>))) + (format #t "test-name: ~A~%" (result 'test-name)) + (format #t "location: ~A~%" + (string-append (result 'source-file) ":" + (number->string (result 'source-line)))) + (test-display "source" (result 'source-form) #:pretty? #t))) + + (define (test-on-test-end-gnu runner) + ;; Procedure called at the end of an individual test case, when the result + ;; of the test is available. + (let* ((results (test-result-alist runner)) + (result? (cut assq <> results)) + (result (cut assq-ref results <>))) + (unless brief? + ;; Display the result of each test case on the console. + (format out-port "~A: ~A - ~A~%" + (result->string (test-result-kind runner) #:colorize? color?) + test-name (test-runner-test-name runner))) + (when (result? 'expected-value) + (test-display "expected-value" (result 'expected-value))) + (when (result? 'expected-error) + (test-display "expected-error" (result 'expected-error) #:pretty? #t)) + (when (result? 'actual-value) + (test-display "actual-value" (result 'actual-value))) + (when (result? 'actual-error) + (test-display "actual-error" (result 'actual-error) #:pretty? #t)) + (format #t "result: ~a~%" (result->string (result 'result-kind))) + (newline) + (format trs-port ":test-result: ~A ~A~%" + (result->string (test-result-kind runner)) + (test-runner-test-name runner)))) + + (define (test-on-group-end-gnu runner) + ;; Procedure called by a 'test-end', including at the end of a test-group. + (let ((fail (or (positive? (test-runner-fail-count runner)) + (positive? (test-runner-xpass-count runner)))) + (skip (or (positive? (test-runner-skip-count runner)) + (positive? (test-runner-xfail-count runner))))) + ;; XXX: The global results need some refinements for XPASS. + (format trs-port ":global-test-result: ~A~%" + (if fail "FAIL" (if skip "SKIP" "PASS"))) + (format trs-port ":recheck: ~A~%" + (if fail "yes" "no")) + (format trs-port ":copy-in-global-log: ~A~%" + (if (or fail skip) "yes" "no")) + (when brief? + ;; Display the global test group result on the console. + (format out-port "~A: ~A~%" + (result->string (if fail 'fail (if skip 'skip 'pass)) + #:colorize? color?) + test-name)) + #f)) + + (let ((runner (test-runner-null))) + (test-runner-on-test-begin! runner test-on-test-begin-gnu) + (test-runner-on-test-end! runner test-on-test-end-gnu) + (test-runner-on-group-end! runner test-on-group-end-gnu) + (test-runner-on-bad-end-name! runner test-on-bad-end-name-simple) + runner)) + +;;; +;;; Entry point. +;;; + +(define (main . args) + (let* ((opts (getopt-long (command-line) %options)) + (option (cut option-ref opts <> <>))) + (cond + ((option 'help #f) (show-help)) + ((option 'version #f) (format #t "test-driver.scm ~A" script-version)) + (else + (let ((log (open-file (option 'log-file "") "w0")) + (trs (open-file (option 'trs-file "") "wl")) + (out (duplicate-port (current-output-port) "wl"))) + (redirect-port log (current-output-port)) + (redirect-port log (current-warning-port)) + (redirect-port log (current-error-port)) + (test-with-runner + (test-runner-gnu (option 'test-name #f) + #:color? (option->boolean opts 'color-tests) + #:brief? (option->boolean opts 'brief) + #:out-port out #:trs-port trs) + (load-from-path (option 'test-name #f))) + (close-port log) + (close-port trs) + (close-port out)))) + (exit 0))) diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..6f61cc2 --- /dev/null +++ b/configure.ac @@ -0,0 +1,39 @@ +dnl -*- Autoconf -*- + +AC_INIT(vouivre, 0.1.0) +AC_SUBST(HVERSION, "\"0.1.0\"") +AC_SUBST(AUTHOR, "\"Vouivre Digital Corporation\"") +AC_SUBST(COPYRIGHT, "'(2023)") +AC_SUBST(LICENSE, gpl3+) +AC_CONFIG_SRCDIR(vouivre.scm) +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([1.12 gnu silent-rules subdir-objects color-tests parallel-tests -Woverride -Wno-portability]) +AM_SILENT_RULES([yes]) + +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) + +dnl Search for 'guile' and 'guild'. This macro defines +dnl 'GUILE_EFFECTIVE_VERSION'. +GUILE_PKG([3.0 2.2 2.0]) +GUILE_PROGS +GUILE_SITE_DIR +if test "x$GUILD" = "x"; then + AC_MSG_ERROR(['guild' binary not found; please check your guile-2.x installation.]) +fi + +if test "$cross_compiling" != no; then + GUILE_TARGET="--target=$host_alias" + AC_SUBST([GUILE_TARGET]) +fi + +dnl Hall auto-generated guile-module dependencies + + +dnl Installation directories for .scm and .go files. +guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION" +guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache" +AC_SUBST([guilemoduledir]) +AC_SUBST([guileobjectdir]) + +AC_OUTPUT diff --git a/doc/vouivre.texi b/doc/vouivre.texi new file mode 100644 index 0000000..099f512 --- /dev/null +++ b/doc/vouivre.texi @@ -0,0 +1,60 @@ +\input texinfo +@c -*-texinfo-*- + +@c %**start of header +@setfilename vouivre.info +@documentencoding UTF-8 +@settitle Vouivre Reference Manual +@c %**end of header + +@include version.texi + +@copying +Copyright @copyright{} 2023 Vouivre Digital Corporation + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A +copy of the license is included in the section entitled ``GNU Free +Documentation License''. +@end copying + +@dircategory The Algorithmic Language Scheme +@direntry +* Vouivre: (vouivre). +@end direntry + +@titlepage +@title The Vouivre Manual +@author Vouivre Digital Corporation + +@page +@vskip 0pt plus 1filll +Edition @value{EDITION} @* +@value{UPDATED} @* + +@insertcopying +@end titlepage + +@contents + +@c ********************************************************************* +@node Top +@top Vouivre + +This document describes Vouivre version @value{VERSION}. + +@menu +* Introduction:: Why Vouivre? +@end menu + +@c ********************************************************************* +@node Introduction +@chapter Introduction + +INTRODUCTION HERE + +This documentation is a stub. + +@bye diff --git a/base.scm b/examples/base.scm similarity index 98% rename from base.scm rename to examples/base.scm index 8c62bae..90a88a8 100644 --- a/base.scm +++ b/examples/base.scm @@ -20,10 +20,13 @@ #:use-module ((rnrs base) #:prefix rnrs:) #:use-module ((srfi srfi-1) #:prefix srfi-1:) #:use-module (vouivre curry) + #:use-module ((vouivre autodiff) #:prefix v:) #:export (∘ ⊙ - flip) + flip + fdiff + rdiff) #:replace (boolean? not @@ -362,7 +365,7 @@ (cudefine (log x) (rnrs:log x)) (∷ sin (0 . 0)) -(cudefine (sin x) (rnrs:sin x)) +(cudefine (sin x) (v:sin x)) (∷ cos (0 . 0)) (cudefine (cos x) (rnrs:cos x)) @@ -603,3 +606,6 @@ (definec (∘ g f) (λc x (g (f x)))) (definec (⊙ f g) (∘ g f)) (definec (flip f) (λc y (λc x (f x y)))) + +(define fdiff v:fdiff) +(define rdiff v:rdiff) diff --git a/guix.scm b/guix.scm new file mode 100644 index 0000000..ee041ad --- /dev/null +++ b/guix.scm @@ -0,0 +1,36 @@ +(use-modules + (guix packages) + ((guix licenses) #:prefix license:) + (guix download) + (guix gexp) + (guix build-system gnu) + (gnu packages) + (gnu packages autotools) + (gnu packages guile) + (gnu packages guile-xyz) + (gnu packages pkg-config) + (gnu packages texinfo) + (srfi srfi-1)) + +(package + (name "vouivre") + (version "0.1.0") + (source + (local-file + (dirname (current-filename)) + #:recursive? + #t + #:select? + (lambda (file stat) + (not (any (lambda (my-string) (string-contains file my-string)) + (list ".git" ".dir-locals.el" "guix.scm")))))) + (build-system gnu-build-system) + (arguments `()) + (native-inputs (list autoconf automake pkg-config texinfo)) + (inputs (list guile-3.0)) + (propagated-inputs (list)) + (synopsis "") + (description "") + (home-page "https://vouivredigital.com") + (license license:gpl3+)) + diff --git a/hall.scm b/hall.scm new file mode 100644 index 0000000..2679954 --- /dev/null +++ b/hall.scm @@ -0,0 +1,69 @@ +(hall-description + (name "vouivre") + (prefix "") + (version "0.1.0") + (author "Vouivre Digital Corporation") + (email "admin@vouivredigital.com") + (copyright (2023)) + (synopsis "") + (description "") + (home-page "https://vouivredigital.com") + (license gpl3+) + (dependencies `()) + (skip ()) + (features ((guix #f) (native-language-support #f) (licensing #f))) + (files (libraries + ((scheme-file "vouivre") + (directory + "language" + ((directory + "vouivre" + ((scheme-file "decompile-tree-il") + (scheme-file "spec") + (scheme-file "compile-tree-il"))))) + (directory + "vouivre" + ((scheme-file "hconfig") + (scheme-file "curry") + (scheme-file "autodiff") + (scheme-file "misc") + (scheme-file "promises") + (scheme-file "mnist"))))) + (tests ((directory + "tests" + ((scheme-file "curry") (scheme-file "autodiff"))))) + (programs ((directory "scripts" ()) + (directory "examples" ((scheme-file "example") + (scheme-file "base"))))) + (documentation + ((org-file "README") + (symlink "README" "README.org") + (text-file "HACKING") + (text-file "COPYING") + (text-file "COPYING.LESSER") + (directory + "doc" + ((info-file "vouivre") + (info-file "version") + (texi-file "version") + (text-file ".dirstamp") + (texi-file "vouivre") + (text-file "stamp-vti"))) + (text-file "LICENSE") + (text-file "NEWS") + (text-file "AUTHORS") + (text-file "ChangeLog"))) + (infrastructure + ((scheme-file "guix") + (text-file ".gitignore") + (scheme-file "hall") + (directory + "build-aux" + ((tex-file "texinfo") + (text-file "mdate-sh") + (scheme-file "test-driver") + (text-file "missing") + (text-file "install-sh"))) + (autoconf-file "configure") + (in-file "pre-inst-env") + (automake-file "Makefile"))))) diff --git a/compile-tree-il.scm b/language/vouivre/compile-tree-il.scm similarity index 100% rename from compile-tree-il.scm rename to language/vouivre/compile-tree-il.scm diff --git a/decompile-tree-il.scm b/language/vouivre/decompile-tree-il.scm similarity index 100% rename from decompile-tree-il.scm rename to language/vouivre/decompile-tree-il.scm diff --git a/spec.scm b/language/vouivre/spec.scm similarity index 100% rename from spec.scm rename to language/vouivre/spec.scm diff --git a/pre-inst-env.in b/pre-inst-env.in new file mode 100644 index 0000000..31c499d --- /dev/null +++ b/pre-inst-env.in @@ -0,0 +1,13 @@ +#!/bin/sh + +abs_top_srcdir="`cd "@abs_top_srcdir@" > /dev/null; pwd`" +abs_top_builddir="`cd "@abs_top_builddir@" > /dev/null; pwd`" + +GUILE_LOAD_COMPILED_PATH="$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" +GUILE_LOAD_PATH="$abs_top_builddir:$abs_top_srcdir${GUILE_LOAD_PATH:+:}:$GUILE_LOAD_PATH" +export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH + +PATH="$abs_top_builddir/scripts:$PATH" +export PATH + +exec "$@" diff --git a/autodiff-tests.scm b/tests/autodiff.scm similarity index 100% rename from autodiff-tests.scm rename to tests/autodiff.scm diff --git a/curry-tests.scm b/tests/curry.scm similarity index 100% rename from curry-tests.scm rename to tests/curry.scm diff --git a/vouivre.scm b/vouivre.scm new file mode 100644 index 0000000..e69de29 diff --git a/autodiff.scm b/vouivre/autodiff.scm similarity index 100% rename from autodiff.scm rename to vouivre/autodiff.scm diff --git a/curry.scm b/vouivre/curry.scm similarity index 100% rename from curry.scm rename to vouivre/curry.scm diff --git a/vouivre/hconfig.scm b/vouivre/hconfig.scm new file mode 100644 index 0000000..d2ba4a2 --- /dev/null +++ b/vouivre/hconfig.scm @@ -0,0 +1,23 @@ +(define-module + (vouivre hconfig) + #:use-module + (srfi srfi-26) + #:export + (%version + %author + %license + %copyright + %gettext-domain + G_ + N_ + init-nls + init-locale)) + +(define %version "0.1") + +(define %author "Vouivre Digital Corporation") + +(define %license 'gpl3+) + +(define %copyright '(2023)) + diff --git a/misc.scm b/vouivre/misc.scm similarity index 100% rename from misc.scm rename to vouivre/misc.scm diff --git a/mnist.scm b/vouivre/mnist.scm similarity index 100% rename from mnist.scm rename to vouivre/mnist.scm diff --git a/promises.scm b/vouivre/promises.scm similarity index 100% rename from promises.scm rename to vouivre/promises.scm -- 2.39.2