Commit 88787735 authored by Erick Gallesio's avatar Erick Gallesio

Adding snowman prototype

parent c6c9731c
......@@ -2,11 +2,11 @@
#
# Author: Erick Gallesio [[email protected]]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 28-Oct-2006 18:12 (eg)
# Last file update: 11-Jan-2007 16:29 (eg)
EXTRA_DIST =
SUBDIRS = @[email protected] @[email protected] @[email protected] src utils lib @[email protected] @[email protected] \
extensions tests doc
snowman extensions tests doc snowman
SVN_URL = @[email protected]/STklos
VERSION_TAG = @[email protected]@[email protected]
VERSION_BETA = $(VERSION_TAG)-beta
......
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [[email protected]]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 28-Oct-2006 18:12 (eg)
# Last file update: 11-Jan-2007 16:29 (eg)
srcdir = @[email protected]
top_srcdir = @[email protected]
VPATH = @[email protected]
......@@ -204,7 +204,7 @@ sysconfdir = @[email protected]
target_alias = @[email protected]
EXTRA_DIST =
SUBDIRS = @[email protected] @[email protected] @[email protected] src utils lib @[email protected] @[email protected] \
extensions tests doc
snowman extensions tests doc snowman
VERSION_TAG = @[email protected]@[email protected]
VERSION_BETA = $(VERSION_TAG)-beta
......
......@@ -7431,7 +7431,7 @@ fi
ac_config_files="$ac_config_files Makefile src/Makefile src/extraconf.h doc/Makefile lib/Makefile gtklos/Makefile gtklos/gtklosconf.h utils/Makefile lib/boot-callcc.stk utils/stklos-config utils/stklos-script extensions/Makefile examples/Makefile examples/images/Makefile lib/Match.d/Makefile lib/SILex.d/Makefile lib/Lalr.d/Makefile lib/Lurc.d/Makefile lib/Snow.d/Makefile tests/Makefile extensions/extconf.h doc/stklos.1 doc/stklos-config.1 doc/stklos-compile.1 doc/stklos-genlex.1 doc/stklos-install.1 doc/skb/stklos-version.stk"
ac_config_files="$ac_config_files Makefile src/Makefile src/extraconf.h doc/Makefile lib/Makefile gtklos/Makefile gtklos/gtklosconf.h utils/Makefile lib/boot-callcc.stk utils/stklos-config utils/stklos-script extensions/Makefile examples/Makefile examples/images/Makefile lib/Match.d/Makefile lib/SILex.d/Makefile lib/Lalr.d/Makefile lib/Lurc.d/Makefile lib/Snow.d/Makefile tests/Makefile extensions/extconf.h doc/stklos.1 doc/stklos-config.1 doc/stklos-compile.1 doc/stklos-genlex.1 doc/stklos-install.1 doc/skb/stklos-version.stk snowman/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
......@@ -8046,6 +8046,7 @@ do
"doc/stklos-genlex.1") CONFIG_FILES="$CONFIG_FILES doc/stklos-genlex.1" ;;
"doc/stklos-install.1") CONFIG_FILES="$CONFIG_FILES doc/stklos-install.1" ;;
"doc/skb/stklos-version.stk") CONFIG_FILES="$CONFIG_FILES doc/skb/stklos-version.stk" ;;
"snowman/Makefile") CONFIG_FILES="$CONFIG_FILES snowman/Makefile" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
......
......@@ -2,7 +2,7 @@ dnl configure.in for STklos
dnl
dnl Author: Erick Gallesio [[email protected]]
dnl Creation date: 28-Dec-1999 21:19 (eg)
dnl Last file update: 20-Dec-2006 10:10 (eg)
dnl Last file update: 11-Jan-2007 16:27 (eg)
AC_INIT(src/stklos.c)
......@@ -518,7 +518,8 @@ AC_OUTPUT(Makefile src/Makefile src/extraconf.h doc/Makefile
tests/Makefile extensions/extconf.h
doc/stklos.1 doc/stklos-config.1 doc/stklos-compile.1
doc/stklos-genlex.1 doc/stklos-install.1
doc/skb/stklos-version.stk)
doc/skb/stklos-version.stk
snowman/Makefile)
chmod 0755 utils/stklos-config utils/stklos-script
......
;;;;
;;;; _snow.stk -- A special version of _snow package (the one used by everybody)
;;;;
;;;; Copyright 2006 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;; Copyright © 2006-2007 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 21-Dec-2006 14:55 (eg)
;;;; Last file update: 22-Dec-2006 00:15 (eg)
;;;; Last file update: 17-Jan-2007 10:54 (eg)
;;;;
;//FIXME: _snow:program-filename should be defined as program-file-name
......@@ -30,8 +30,15 @@
(define-module _snow
(import SNOW)
(export snow-raise snow-error snow-with-exception-catcher
_snow:program-filename)
_snow:program-filename
snow-condition snow-type-check-condition snow-error-condition
;; FIXME
snow-exception)
;;
;; Functions
......@@ -54,15 +61,27 @@
;;
;; Exceptions
;;
(define-exception* snow-condition)
;;// (define-exception* snow-condition)
;;//
;;// (define-exception* snow-type-check-condition
;;// parent: snow-condition)
;;//
;;// (define-exception* snow-error-condition
;;// parent: snow-condition
;;// msg
;;// args))
(define-record* snow-condition)
(define-exception* snow-type-check-condition
parent: snow-condition)
(define-record* snow-type-check-condition parent: snow-condition)
(define-exception* snow-error-condition
(define-record* snow-error-condition
parent: snow-condition
msg
args))
args)
(define snow-exception snow-condition) ;; FIXME: Bigloo adaptation
)
;; ----------------------------------------------------------------------
;; Redefine all the symbols exported by _snow to the STklos module
......
;;;;
;;;; snow-stklos.stk -- Snow packages in STklos
;;;;
;;;; Copyright 2006 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;; Copyright 2006-2007 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 11-Dec-2006 14:39 (eg)
;;;; Last file update: 21-Dec-2006 15:39 (eg)
;;;; Last file update: 17-Jan-2007 11:25 (eg)
;;;;
......@@ -30,8 +30,9 @@
;; ======================================================================
(define-macro (package* name version . body)
`(begin
(require "snow-support")
(define-module ,name
(require "_snow")
;(require "_snow")
(define %%package-version ',version)
,@(package*-body-expand body))
(select-module ,name)))
......@@ -67,6 +68,21 @@
`(begin
(define ,var ,value)
(export ,var)))
;; define
((define (?var . ?args))
`(export ,var))
((define (?var . ?args) . ?rest)
`(begin
(define (,var . args) ,@rest)
(export ,var)))
((define ?var)
`(export ,var))
((define ?var ?value)
`(begin
(define ,var ,value)
(export ,var)))
;; define-macro*
((define-macro* . ?rest)
`(define-macro ,@rest))
......
;;;;
;;;; snow-record.stk -- Snow record support
;;;;
;;;; Copyright 2006 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;; Copyright 2006-2007 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 21-Dec-2006 12:00 (eg)
;;;; Last file update: 21-Dec-2006 12:02 (eg)
;;;; Last file update: 17-Jan-2007 10:59 (eg)
;;;;
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 26-Feb-2000 10:47 (eg)
;;;; Last file update: 5-Jan-2007 19:43 (eg)
;;;; Last file update: 19-Jan-2007 10:17 (eg)
;;;;
(define-module STKLOS-COMPILER
......@@ -1167,22 +1167,6 @@ doc>
(Loop (cdr l)
loc)))))))))))
(define (compile-let* args env tail?)
(let ((len (length args)))
(if (< len 3)
(compiler-error 'let* args "ill formed let* ~S" args)
(let ((bindings (cadr args))
(body (cddr args)))
(when (valid-let-bindings? bindings #f)
(compile (if (<= (length bindings) 1)
`(let ,bindings ,@body)
`(let (,(car bindings))
(let* ,(cdr bindings)
,@body)))
env args tail?))))))
;;
;; COND
......
;;;;
;;;; load.stk -- Extended load function
;;;;
;;;; Copyright 2000-2006 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;; Copyright 2000-2007 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 17-May-2000 14:55 (eg)
;;;; Last file update: 13-Dec-2006 17:09 (eg)
;;;; Last file update: 17-Jan-2007 11:46 (eg)
;;;;
......@@ -156,7 +156,10 @@ doc>
(define (try f)
; (eprintf "Try ~S\n" f)
(and (file-exists? f) (file-is-readable? f) f))
(and (file-exists? f)
(file-is-readable? f)
(not (file-is-directory? f))
f))
(define (try-load-with-suffixes name suffixes)
(let Loop ((s suffixes))
......@@ -196,7 +199,7 @@ doc>
(res #f)
(out (current-error-port))
(mod (current-module)))
(when path
(when (and path (not (file-is-directory? path)))
(current-loading-file path)
(with-handler (lambda (c)
(set! %try-load-tmp (cons c %try-load-tmp))
......
;;;;
;;;; snow-support.stk -- Support Scheme Now! packages for STklos
;;;;
;;;; Copyright 2006 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;; Copyright 2006-2007 Erick Gallesio - I3S-CNRS/ESSI <[email protected]>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [[email protected]]
;;;; Creation date: 20-Dec-2006 10:18 (eg)
;;;; Last file update: 21-Dec-2006 15:44 (eg)
;;;; Last file update: 17-Jan-2007 11:06 (eg)
;;;;
;; ======================================================================
......@@ -39,6 +39,7 @@
;; ======================================================================
;; bootstrap
;; ======================================================================
(require-for-syntax "Snow.d/snow-record.stk")
(include "Snow.d/_snow.stk")
(provide "snow-support")
......
# Makefile for stklos-snowman
# Author: Erick Gallesio [[email protected]]
# Creation date: 22-Dec-2006 12:00 (eg)
# Last file update: 18-Jan-2007 16:41 (eg)
makefiledir= $(prefix)/etc/stklos
makefile_DATA= etc/Makefile-snow.tmpl
bin_SCRIPTS = stklos-snowman
SRC = main.stk extract.stk params.stk repository.stk \
snowball.stk misc.stk types.stk
SFLAGS = -l
RM = /bin/rm
SCC = ../utils/stklos-compile
$(bin_SCRIPTS): $(SRC)
$(SCC) $(SFLAGS) -o $(bin_SCRIPTS) main.stk
clean:
$(RM) -f $(bin_SCRIPTS) *~
distclean: clean
$(RM) -f config.stk
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @[email protected]
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@[email protected]
# Makefile for stklos-snowman
# Author: Erick Gallesio [[email protected]]
# Creation date: 22-Dec-2006 12:00 (eg)
# Last file update: 18-Jan-2007 16:41 (eg)
srcdir = @[email protected]
top_srcdir = @[email protected]
VPATH = @[email protected]
pkgdatadir = $(datadir)/@[email protected]
pkglibdir = $(libdir)/@[email protected]
pkgincludedir = $(includedir)/@[email protected]
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @[email protected]
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = snowman
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/src/stklosconf.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(makefiledir)"
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
makefileDATA_INSTALL = $(INSTALL_DATA)
DATA = $(makefile_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @[email protected]
AMDEP_FALSE = @[email protected]
AMDEP_TRUE = @[email protected]
AMTAR = @[email protected]
AUTOCONF = @[email protected]
AUTOHEADER = @[email protected]
AUTOMAKE = @[email protected]
AWK = @[email protected]
BUILD_ARCH = @[email protected]
BUILD_OS = @[email protected]
CALLCC_STK = @[email protected]
CC = @[email protected]
CCDEPMODE = @[email protected]
CFLAGS = @[email protected]
COMPOBJ = @[email protected]
COMPSRC = @[email protected]
CPP = @[email protected]
CPPFLAGS = @[email protected]
CYGPATH_W = @[email protected]
DEFS = @[email protected]
DEF_PCRE = @[email protected]
DEPDIR = @[email protected]
ECHO_C = @[email protected]
ECHO_N = @[email protected]
ECHO_T = @[email protected]
EGREP = @[email protected]
EXAMPLES = @[email protected]
EXECDIR = @[email protected]
EXEEXT = @[email protected]
GC = @[email protected]
GCINC = @[email protected]
GCLIB = @[email protected]
GMP = @[email protected]
GMPINC = @[email protected]
GMPLIB = @[email protected]
GNOME_CONFIG = @[email protected]
GREP = @[email protected]
GTKLOS = @[email protected]
GTK_CONFIG = @[email protected]
GTK_CONFIG_CFLAGS = @[email protected]
GTK_CONFIG_LIBS = @[email protected]
HAVE_DLOPEN = @[email protected]
HAVE_GNOME = @[email protected]
HAVE_LDAP = @[email protected]
INSTALL_DATA = @[email protected]
INSTALL_PROGRAM = @[email protected]
INSTALL_SCRIPT = @[email protected]
INSTALL_STRIP_PROGRAM = @[email protected]
LDAP_LIB = @[email protected]
LDFLAGS = @[email protected]
LIBOBJS = @[email protected]
LIBS = @[email protected]
LTLIBOBJS = @[email protected]
LURCDIR = @[email protected]
LURC_FALSE = @[email protected]
LURC_TRUE = @[email protected]
MAKEINFO = @[email protected]
NO_THREAD_FALSE = @[email protected]
NO_THREAD_TRUE = @[email protected]
OBJEXT = @[email protected]
OS_FLAVOUR = @[email protected]
OS_NAME = @[email protected]
PACKAGE = @[email protected]
PACKAGE_BUGREPORT = @[email protected]
PACKAGE_NAME = @[email protected]
PACKAGE_STRING = @[email protected]
PACKAGE_TARNAME = @[email protected]
PACKAGE_VERSION = @[email protected]
PATH_SEPARATOR = @[email protected]
PCRE = @[email protected]
PCREINC = @[email protected]
PCRELIB = @[email protected]
PCRETARGET = @[email protected]
PREFIX = @[email protected]
PTHREADS_FALSE = @[email protected]
PTHREADS_TRUE = @[email protected]
RANLIB = @[email protected]
SCMDIR = @[email protected]
SET_MAKE = @[email protected]
SHELL = @[email protected]
SH_COMP_FLAGS = @[email protected]
SH_LOADER = @[email protected]
SH_LOAD_FLAGS = @[email protected]
SH_MAIN_LOAD_FLAGS = @[email protected]
SH_SUFFIX = @[email protected]
STACK_DIRECTION = @[email protected]
STKCFLAGS = @[email protected]
STRIP = @[email protected]
SVN_URL = @[email protected]
THREADS = @[email protected]
VERSION = @[email protected]
ac_ct_CC = @[email protected]
am__fastdepCC_FALSE = @[email protected]
am__fastdepCC_TRUE = @[email protected]
am__include = @[email protected]
am__leading_dot = @[email protected]
am__quote = @[email protected]
am__tar = @[email protected]
am__untar = @[email protected]
bindir = @[email protected]
build_alias = @[email protected]
datadir = @[email protected]
datarootdir = @[email protected]
docdir = @[email protected]
dvidir = @[email protected]
exec_prefix = @[email protected]
host_alias = @[email protected]
htmldir = @[email protected]
includedir = @[email protected]
infodir = @[email protected]
install_sh = @[email protected]
libdir = @[email protected]
libexecdir = @[email protected]
localedir = @[email protected]
localstatedir = @[email protected]
mandir = @[email protected]
mkdir_p = @[email protected]
oldincludedir = @[email protected]
pdfdir = @[email protected]
prefix = @[email protected]
program_transform_name = @[email protected]
psdir = @[email protected]
sbindir = @[email protected]
sharedstatedir = @[email protected]
sysconfdir = @[email protected]
target_alias = @[email protected]
makefiledir = $(prefix)/etc/stklos
makefile_DATA = etc/Makefile-snow.tmpl
bin_SCRIPTS = stklos-snowman
SRC = main.stk extract.stk params.stk repository.stk \
snowball.stk misc.stk types.stk
SFLAGS = -l
RM = /bin/rm
SCC = ../utils/stklos-compile
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu snowman/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu snowman/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
uninstall-info-am:
install-makefileDATA: $(makefile_DATA)
@$(NORMAL_INSTALL)
test -z "$(makefiledir)" || $(mkdir_p) "$(DESTDIR)$(makefiledir)"
@list='$(makefile_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(makefileDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(makefiledir)/$$f'"; \
$(makefileDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(makefiledir)/$$f"; \
done
uninstall-makefileDATA:
@$(NORMAL_UNINSTALL)
@list='$(makefile_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(makefiledir)/$$f'"; \
rm -f "$(DESTDIR)$(makefiledir)/$$f"; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \