ChangeLog | 14 +++++
Makefile.am | 5 -
build-aux/Makefile.am | 23 ++++++++
build-aux/bison++.in | 66 ++++++++++++++++++++++++
build-aux/move-if-change | 18 ++++++
build-aux/readline.m4 | 125 +++++++++++++++++++++++++++++++++++++++++++++++
config/Makefile.am | 23 --------
config/bison++.in | 66 ------------------------
config/move-if-change | 18 ------
config/readline.m4 | 125 -----------------------------------------------
configure.ac | 19 +++----
src/parse/Makefile.am | 6 +-
12 files changed, 260 insertions(+), 248 deletions(-)
Index: ChangeLog
from Benoît Perrot <benoit(a)lrde.epita.fr>
Rename config/ as build-aux/ to match with up-to-date coding
standards.
* config/Makefile.am, config/bison++.in,
* config/move-if-change, config/readline.m4:
Move to...
* build-aux/Makefile.am, build-aux/bison++.in,
* build-aux/move-if-change, build-aux/readline.m4:
... here.
* configure.ac, Makefile.am, src/parse/Makefile.am:
Adjust accordingly.
Index: src/parse/Makefile.am
--- src/parse/Makefile.am (révision 200)
+++ src/parse/Makefile.am (révision 201)
@@ -31,10 +31,10 @@
$(srcdir)/asm-parse.yy: asm-parse.yy.stamp
# A Bison wrapper for C++.
-BISONXX = $(top_builddir)/config/bison++
-BISONXX_IN = $(top_srcdir)/config/bison++.in
+BISONXX = $(top_builddir)/build-aux/bison++
+BISONXX_IN = $(top_srcdir)/build-aux/bison++.in
$(BISONXX): $(BISONXX_IN)
- cd $(top_builddir)/config && $(MAKE) $(AM_MAKEFLAGS) bison++
+ cd $(top_builddir)/build-aux && $(MAKE) $(AM_MAKEFLAGS) bison++
EXTRA_DIST += $(srcdir)/bison++.stamp $(srcdir)/asm-parse.yy
$(srcdir)/bison++.stamp: $(srcdir)/asm-parse.yy $(BISONXX_IN)
Index: build-aux/readline.m4
--- build-aux/readline.m4 (révision 0)
+++ build-aux/readline.m4 (révision 201)
@@ -0,0 +1,125 @@
+# Check readline presence and usability. -*-Autoconf-*-
+#
+# Copyright (C) 2004 Benoit Perrot
+#
+# 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA
+
+dnl AC_CHECK_READLINE
+dnl Check readline libraries and includes usability. If the user gave
+dnl the command line options `--with-readline-includes=dir' and
+dnl `--with-readline-library=dir', use those directories. If readline is not
+dnl found or cannot be used, or the user gave the command line option
+dnl `--without-readline', set the shell variable no_readline to `yes';
+dnl otherwise set it to the empty string. Set the variables READLINE_CPPFLAGS,
+dnl READLINE_LIBS and READLINE_LDFLAGS to their correct content if
+dnl readline is found, to the empty string else.
+
+AC_DEFUN([AC_CHECK_READLINE], [
+
+## -- Prologue
+
+# Allow the user to disable readline
+AC_ARG_WITH([readline],
+ [AC_HELP_STRING([--without-readline],
+ [do not use readline (default is YES)])])
+
+# Let the user precise includes and library paths
+AC_ARG_WITH([readline-includes],
+ [AC_HELP_STRING([--with-readline-includes=DIR],
+ [use DIR to look for readline includes])],
+ [readline_includes=$withval],
+ [readline_includes=no]
+ )
+AC_ARG_WITH([readline-library],
+ [AC_HELP_STRING([--with-readline-library=DIR],
+ [use DIR to look for readline library])],
+ [readline_library=$withval],
+ [readline_library=no]
+ )
+
+## -- Engine
+
+# Save current compilation flags to restore them if something goes wrong
+ac_cv_saved_CPPFLAGS=$CPPFLAGS
+ac_cv_saved_LDFLAGS=$LDFLAGS
+ac_cv_saved_LIBS=$LIBS
+
+# Reset READLINE strings and prepare their substitution
+AC_SUBST([READLINE_CPPFLAGS], [""])
+AC_SUBST([READLINE_LDFLAGS], [""])
+AC_SUBST([READLINE_LIBS], [""])
+
+no_readline="yes"
+if test "x$with_readline" != xno; then
+
+ if test "x$readline_includes" != xno; then
+ READLINE_CPPFLAGS="-I$readline_includes"
+ CPPFLAGS="$CPPFLAGS $READLINE_CPPFLAGS"
+ fi
+
+ # Check for readline headers
+ AC_CHECK_HEADER([readline/readline.h],
+ [
+ if test "x$readline_library" != xno; then
+ READLINE_LDFLAGS="-L$readline_library"
+ LDFLAGS="$LDFLAGS $READLINE_LDFLAGS"
+ fi
+
+ # Search for tgetent function, on which readline may depends
+ AC_SEARCH_LIBS([tgetent],
+ [readline termcap curses ncurses],
+ [TERMCAP_LIBS=$ac_cv_search_tgetent])
+
+ READLINE_LIBS="-lreadline"
+ if test "$TERMCAP_LIBS" != "-lreadline"; then
+ READLINE_LIBS="$READLINE_LIBS $TERMCAP_LIBS"
+ # TERMCAP_LIBS was automaticaly added to LIBS by AC_SEARCH_LIBS
+ fi
+
+ # Check for readline library presence and usability
+ AC_CHECK_LIB([readline], [readline], [no_readline=""])
+ ])
+
+ ## -- Epilogue
+
+ # Display readline check status
+ AC_MSG_CHECKING([for readline])
+
+ if test "$no_readline"; then
+ # Restore environment variables
+ READLINE_CPPFLAGS=""
+ READLINE_LDFLAGS=""
+ READLINE_LIBS=""
+
+ AC_MSG_RESULT([no])
+ else
+ AC_DEFINE([HAVE_LIBREADLINE],
+ [1],
+ [Define to 1 if you have the readline library.])
+ AC_DEFINE([HAVE_READLINE_READLINE_H],
+ [1],
+ [Define to 1 if you have the <readline/readline.h> header file.])
+
+ AC_MSG_RESULT([yes])
+ fi
+
+fi
+
+CPPFLAGS=$ac_cv_saved_CPPFLAGS
+LDFLAGS=$ac_cv_saved_LDFLAGS
+LIBS=$ac_cv_saved_LIBS
+
+])
Index: build-aux/bison++.in
--- build-aux/bison++.in (révision 0)
+++ build-aux/bison++.in (révision 201)
@@ -0,0 +1,66 @@
+#! /bin/sh
+
+# Any tool failure is a failure of the script.
+set -e
+
+: ${BISON=@BISON@}
+
+# bison++ SRCDIR INPUT OUTPUT OPTIONS
+# -----------------------------------
+
+me=$(basename $0)
+move_if_change='@abs_srcdir@/move-if-change'
+
+srcdir=$1
+abs_srcdir=$(cd $srcdir && pwd)
+shift
+input=$1
+shift
+output=$1
+shift
+options="-S lalr1.cc $@"
+
+# Alexandre Duret-Lutz also notes that in VPATH-builds $(srcdir) can
+# be an absolute path depending on how ./configure is called ...
+# In that case
+
+# bison $(srcdir)/parsetiger.yy [...]
+
+# will hard code the path in the maintainer's tree. Hence, do not use
+# paths with Bison, chdir there.
+
+# A tmp dir.
+tmp=$output.dir
+rm -rf $tmp
+mkdir $tmp
+
+# Compile in this dir.
+# Don't use `ln -s' as its semantics of paths sucks.
+cp $srcdir/$input $tmp
+cd $tmp
+$BISON $options -S lalr1.cc $input -o $output
+
+# Bison 2.0 forgets to implement %lex-param for the C++ parsers.
+lex_param=$(perl -ne 'print /^%lex-param\s*\{.*\b(\w+)\s*\}/' $input)
+if test x"$lex_param" != x; then
+ # Replace the two-argument call to yylex to a three argument call.
+ perl -pi -e 's/(yylex \(&yylval, &yylloc)\)/$1,
'"$lex_param)/" $output;
+fi
+
+for file in *
+do
+ case $file in
+ $input)
+ # Leave it here.
+ ;;
+ *)
+ # Fix doxygen tags.
+ perl -pi -e "s|\Q\\file $file\E\b|\\\\file parse/$file|g;"
"$file"
+ $move_if_change "$file" "$abs_srcdir/$file"
+ ;;
+ esac
+done
+
+# Get rid of the tmp dir.
+cd ..
+rm -rf $tmp
Modification de propriétés sur build-aux/bison++.in
___________________________________________________________________
Nom : svn:executable
+ *
Index: build-aux/move-if-change
--- build-aux/move-if-change (révision 0)
+++ build-aux/move-if-change (révision 201)
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Like mv $1 $2, but if the files are the same, just delete $1.
+# Status is 0 if $2 is changed, 1 otherwise.
+if
+test -r $2
+then
+if
+cmp -s $1 $2
+then
+echo $2 is unchanged
+rm -f $1
+else
+mv -f $1 $2
+fi
+else
+mv -f $1 $2
+fi
+
Modification de propriétés sur build-aux/move-if-change
___________________________________________________________________
Nom : svn:executable
+ *
Index: build-aux/Makefile.am
--- build-aux/Makefile.am (révision 0)
+++ build-aux/Makefile.am (révision 201)
@@ -0,0 +1,23 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+##
+
+dist_noinst_SCRIPTS = move-if-change
+nodist_noinst_SCRIPTS = bison++
+
+EXTRA_DIST = $(SPECIFIC_MACROS) $(STANDARD_MACROS) $(SPECIFIC_TOOLS)
+
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(STANDARD_MACROS) \
+ $(STANDARD_TOOLS)
+
+STANDARD_MACROS =
+SPECIFIC_MACROS =
+
+STANDARD_TOOLS = \
+ depcomp \
+ install-sh \
+ missing \
+ mkinstalldirs
+
+SPECIFIC_TOOLS =
Index: configure.ac
--- configure.ac (révision 200)
+++ configure.ac (révision 201)
@@ -1,25 +1,20 @@
##
## Configure Nolimips: a MIPS emulator with unlimited registers
##
+AC_PREREQ(2.59)
+
## Project -----------------------------
AC_INIT([Nolimips],[0.8a],[benoit(a)lrde.epita.fr])
## Setup autotools ---------------------
-# Need autoconf 2.57 at least.
-AC_PREREQ(2.59)
-
# Auxiliary files.
-AC_CONFIG_AUX_DIR([config])
-AC_CONFIG_FILES([config/Makefile])
+AC_CONFIG_AUX_DIR([build-aux])
# Initialize automake.
AM_INIT_AUTOMAKE([foreign 1.7.5 dist-bzip2])
-# Ask for config.h.
-AC_CONFIG_HEADERS([config.h])
-
## Development tools -------------------
# Look for a lex-like program.
@@ -46,13 +41,17 @@
# gnulib modules
nolimips_GNULIB
-# Bison wrapper.
-AC_CONFIG_FILES([config/bison++], [chmod +x config/bison++])
## Epilogue ----------------------------
+AC_CONFIG_FILES([build-aux/bison++], [chmod +x build-aux/bison++])
+
+# Ask for config.h.
+AC_CONFIG_HEADERS([config.h])
+
# Ask for the Makefile creations.
AC_CONFIG_FILES([
Makefile
+ build-aux/Makefile
lib/Makefile
src/Makefile
src/misc/Makefile
Index: config/readline.m4
--- config/readline.m4 (révision 200)
+++ config/readline.m4 (révision 201)
@@ -1,125 +0,0 @@
-# Check readline presence and usability. -*-Autoconf-*-
-#
-# Copyright (C) 2004 Benoit Perrot
-#
-# 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 2 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA
-
-dnl AC_CHECK_READLINE
-dnl Check readline libraries and includes usability. If the user gave
-dnl the command line options `--with-readline-includes=dir' and
-dnl `--with-readline-library=dir', use those directories. If readline is not
-dnl found or cannot be used, or the user gave the command line option
-dnl `--without-readline', set the shell variable no_readline to `yes';
-dnl otherwise set it to the empty string. Set the variables READLINE_CPPFLAGS,
-dnl READLINE_LIBS and READLINE_LDFLAGS to their correct content if
-dnl readline is found, to the empty string else.
-
-AC_DEFUN([AC_CHECK_READLINE], [
-
-## -- Prologue
-
-# Allow the user to disable readline
-AC_ARG_WITH([readline],
- [AC_HELP_STRING([--without-readline],
- [do not use readline (default is YES)])])
-
-# Let the user precise includes and library paths
-AC_ARG_WITH([readline-includes],
- [AC_HELP_STRING([--with-readline-includes=DIR],
- [use DIR to look for readline includes])],
- [readline_includes=$withval],
- [readline_includes=no]
- )
-AC_ARG_WITH([readline-library],
- [AC_HELP_STRING([--with-readline-library=DIR],
- [use DIR to look for readline library])],
- [readline_library=$withval],
- [readline_library=no]
- )
-
-## -- Engine
-
-# Save current compilation flags to restore them if something goes wrong
-ac_cv_saved_CPPFLAGS=$CPPFLAGS
-ac_cv_saved_LDFLAGS=$LDFLAGS
-ac_cv_saved_LIBS=$LIBS
-
-# Reset READLINE strings and prepare their substitution
-AC_SUBST([READLINE_CPPFLAGS], [""])
-AC_SUBST([READLINE_LDFLAGS], [""])
-AC_SUBST([READLINE_LIBS], [""])
-
-no_readline="yes"
-if test "x$with_readline" != xno; then
-
- if test "x$readline_includes" != xno; then
- READLINE_CPPFLAGS="-I$readline_includes"
- CPPFLAGS="$CPPFLAGS $READLINE_CPPFLAGS"
- fi
-
- # Check for readline headers
- AC_CHECK_HEADER([readline/readline.h],
- [
- if test "x$readline_library" != xno; then
- READLINE_LDFLAGS="-L$readline_library"
- LDFLAGS="$LDFLAGS $READLINE_LDFLAGS"
- fi
-
- # Search for tgetent function, on which readline may depends
- AC_SEARCH_LIBS([tgetent],
- [readline termcap curses ncurses],
- [TERMCAP_LIBS=$ac_cv_search_tgetent])
-
- READLINE_LIBS="-lreadline"
- if test "$TERMCAP_LIBS" != "-lreadline"; then
- READLINE_LIBS="$READLINE_LIBS $TERMCAP_LIBS"
- # TERMCAP_LIBS was automaticaly added to LIBS by AC_SEARCH_LIBS
- fi
-
- # Check for readline library presence and usability
- AC_CHECK_LIB([readline], [readline], [no_readline=""])
- ])
-
- ## -- Epilogue
-
- # Display readline check status
- AC_MSG_CHECKING([for readline])
-
- if test "$no_readline"; then
- # Restore environment variables
- READLINE_CPPFLAGS=""
- READLINE_LDFLAGS=""
- READLINE_LIBS=""
-
- AC_MSG_RESULT([no])
- else
- AC_DEFINE([HAVE_LIBREADLINE],
- [1],
- [Define to 1 if you have the readline library.])
- AC_DEFINE([HAVE_READLINE_READLINE_H],
- [1],
- [Define to 1 if you have the <readline/readline.h> header file.])
-
- AC_MSG_RESULT([yes])
- fi
-
-fi
-
-CPPFLAGS=$ac_cv_saved_CPPFLAGS
-LDFLAGS=$ac_cv_saved_LDFLAGS
-LIBS=$ac_cv_saved_LIBS
-
-])
Index: config/move-if-change
--- config/move-if-change (révision 200)
+++ config/move-if-change (révision 201)
@@ -1,18 +0,0 @@
-#!/bin/sh
-# Like mv $1 $2, but if the files are the same, just delete $1.
-# Status is 0 if $2 is changed, 1 otherwise.
-if
-test -r $2
-then
-if
-cmp -s $1 $2
-then
-echo $2 is unchanged
-rm -f $1
-else
-mv -f $1 $2
-fi
-else
-mv -f $1 $2
-fi
-
Index: config/bison++.in
--- config/bison++.in (révision 200)
+++ config/bison++.in (révision 201)
@@ -1,66 +0,0 @@
-#! /bin/sh
-
-# Any tool failure is a failure of the script.
-set -e
-
-: ${BISON=@BISON@}
-
-# bison++ SRCDIR INPUT OUTPUT OPTIONS
-# -----------------------------------
-
-me=$(basename $0)
-move_if_change='@abs_srcdir@/move-if-change'
-
-srcdir=$1
-abs_srcdir=$(cd $srcdir && pwd)
-shift
-input=$1
-shift
-output=$1
-shift
-options="-S lalr1.cc $@"
-
-# Alexandre Duret-Lutz also notes that in VPATH-builds $(srcdir) can
-# be an absolute path depending on how ./configure is called ...
-# In that case
-
-# bison $(srcdir)/parsetiger.yy [...]
-
-# will hard code the path in the maintainer's tree. Hence, do not use
-# paths with Bison, chdir there.
-
-# A tmp dir.
-tmp=$output.dir
-rm -rf $tmp
-mkdir $tmp
-
-# Compile in this dir.
-# Don't use `ln -s' as its semantics of paths sucks.
-cp $srcdir/$input $tmp
-cd $tmp
-$BISON $options -S lalr1.cc $input -o $output
-
-# Bison 2.0 forgets to implement %lex-param for the C++ parsers.
-lex_param=$(perl -ne 'print /^%lex-param\s*\{.*\b(\w+)\s*\}/' $input)
-if test x"$lex_param" != x; then
- # Replace the two-argument call to yylex to a three argument call.
- perl -pi -e 's/(yylex \(&yylval, &yylloc)\)/$1,
'"$lex_param)/" $output;
-fi
-
-for file in *
-do
- case $file in
- $input)
- # Leave it here.
- ;;
- *)
- # Fix doxygen tags.
- perl -pi -e "s|\Q\\file $file\E\b|\\\\file parse/$file|g;"
"$file"
- $move_if_change "$file" "$abs_srcdir/$file"
- ;;
- esac
-done
-
-# Get rid of the tmp dir.
-cd ..
-rm -rf $tmp
Index: config/Makefile.am
--- config/Makefile.am (révision 200)
+++ config/Makefile.am (révision 201)
@@ -1,23 +0,0 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-##
-
-dist_noinst_SCRIPTS = move-if-change
-nodist_noinst_SCRIPTS = bison++
-
-EXTRA_DIST = $(SPECIFIC_MACROS) $(STANDARD_MACROS) $(SPECIFIC_TOOLS)
-
-MAINTAINERCLEANFILES = \
- Makefile.in \
- $(STANDARD_MACROS) \
- $(STANDARD_TOOLS)
-
-STANDARD_MACROS =
-SPECIFIC_MACROS =
-
-STANDARD_TOOLS = \
- depcomp \
- install-sh \
- missing \
- mkinstalldirs
-
-SPECIFIC_TOOLS =
Index: Makefile.am
--- Makefile.am (révision 200)
+++ Makefile.am (révision 201)
@@ -1,9 +1,8 @@
-ACLOCAL_AMFLAGS = -I config -I m4
+ACLOCAL_AMFLAGS = -I build-aux -I m4
-SUBDIRS = config lib src doc tests distrib
+SUBDIRS = build-aux lib src doc tests distrib
EXTRA_DIST = \
bootstrap \
dev/nolimips.xml \
dev/nolimips.py
-