summaryrefslogtreecommitdiffabout
path: root/am
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-07 14:24:18 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2011-05-07 15:55:38 (GMT)
commit4b0e477181f51c12f62236ec91f4bb714125393d (patch) (side-by-side diff)
tree9ddb2c5c16549ce5bf6056e45aef3646402accbc /am
parentcede19f7c5a151c1aeb7c93d1793183bca8e8289 (diff)
downloadgrecs-4b0e477181f51c12f62236ec91f4bb714125393d.tar.gz
grecs-4b0e477181f51c12f62236ec91f4bb714125393d.tar.bz2
Support standalone compilation.
* AUTHORS, COPYING, NEWS, README: New files. * .gitignore: Update. * am/.gitignore: New file. * build-aux/.gitignore: New file. * build-aux/ylwrap: Remove. * Makefile.am: Define ACLOCAL_AMFLAGS [GRECS_CHANGELOG]: Build ChangeLog. * am/grecs.m4: Define GRECS_CHANGELOG and GRECS_SRCDIR. Fixup first argument, if it is [.]. * configure.ac: New file. * src/Make-inst.am (include_HEADERS): Add wordsplit.h. Install libgrecs.m4. * Make-shared.am (noinst_HEADERS): Add wordsplit.h. * src/Make-static.am: Likewise. * src/Make.am (GRECS_SRC): Remove wordsplit.h (noinst_HEADERS): Add yygrecs.h (YLWRAP): Remove. * src/libgrecs.m4: New file. * src/yygrecs.h: New file. * src/grecs-gram.y: Include yygrecs.h. * src/grecs-lex.l: Likewise. * src/preproc.c (yy_grecs_flex_debug): Rename to grecs_yy_flex_debug.
Diffstat (limited to 'am') (more/less context) (ignore whitespace changes)
-rw-r--r--am/.gitignore2
-rw-r--r--am/grecs.m430
2 files changed, 21 insertions, 11 deletions
diff --git a/am/.gitignore b/am/.gitignore
new file mode 100644
index 0000000..94f2b51
--- a/dev/null
+++ b/am/.gitignore
@@ -0,0 +1,2 @@
+libtool.m4
+lt*.m4
diff --git a/am/grecs.m4 b/am/grecs.m4
index e8d6915..81a6ee5 100644
--- a/am/grecs.m4
+++ b/am/grecs.m4
@@ -69,12 +69,13 @@ AC_DEFUN([_GRECS_SET_OPTIONS],
# no preprocessor setup file is installed.
AC_DEFUN([GRECS_SETUP],[
+ m4_pushdef([grecsdir],m4_if($1,[.],,$1,,[grecs/],$1/))
AC_PROG_YACC
AM_PROG_LEX
AC_HEADER_SYS_WAIT
- AC_SUBST([GRECS_SUBDIR],m4_if([$1],,grecs,$1))
+ AC_SUBST([GRECS_SUBDIR],m4_if($1,,grecs,$1))
_GRECS_SET_OPTIONS([$2])
# **********************
# Preprocessor
@@ -134,7 +135,7 @@ AC_DEFUN([GRECS_SETUP],[
DEFAULT_PREPROCESSOR=NULL
fi
_GRECS_IF_OPTION_SET([tests],
- [m4_pushdef([TESTDIR],m4_if([$1],,grecs,$1)/tests)
+ [m4_pushdef([TESTDIR],grecsdir[tests])
AC_CONFIG_TESTDIR(TESTDIR)
AC_CONFIG_FILES(TESTDIR/Makefile TESTDIR/atlocal)
m4_popdef([TESTDIR])
@@ -153,26 +154,33 @@ AC_DEFUN([GRECS_SETUP],[
if test -z "$s"; then
GRECS_VERCMP_AT=vercmp.at
fi
-
+
+ AC_SUBST([GRECS_SRCDIR],$1)
AC_SUBST([GRECS_VERCMP_AT])
AC_SUBST([GRECS_BUILD_AUX])
AC_SUBST([GRECS_INCLUDES])
AC_SUBST([GRECS_TESTDIR])
AC_SUBST([GRECS_LDADD])
AC_SUBST([GRECS_DOCDIR])
+ AC_SUBST([GRECS_CHANGELOG])
+ AC_SUBST([GRECS_INCLUDES],['-I$(top_srcdir)/]grecsdir[src]')
_GRECS_OPTION_SWITCH([install],[
LT_INIT
- GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
+ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la']
GRECS_DOCDIR='doc'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-inst.in
- m4_if([$1],,grecs,$1)/doc/Makefile)
+ GRECS_CHANGELOG=
+ AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-inst.in]
+ grecsdir[doc/Makefile])
],[shared],[
LT_INIT
- GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.la'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-shared.in)
+ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.la']
+ GRECS_CHANGELOG='#'
+ AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-shared.in])
],[
- GRECS_LDADD='$(top_builddir)/m4_if([$1],,grecs,$1)/src/libgrecs.a'
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/src/Makefile:m4_if([$1],,grecs,$1)/src/Make-static.in)
+ GRECS_LDADD=['$(top_builddir)/]grecsdir[src/libgrecs.a']
+ GRECS_CHANGELOG='#'
+ AC_CONFIG_FILES(grecsdir[src/Makefile]:grecsdir[src/Make-static.in])
])
- AC_CONFIG_FILES(m4_if([$1],,grecs,$1)/Makefile)
+ AC_CONFIG_FILES(grecsdir[Makefile])
+ m4_popdef([grecsdir])
])

Return to:

Send suggestions and report system problems to the System administrator.