Commit e0b4646c authored by Michal Cadilhac's avatar Michal Cadilhac

2005-06-04 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>

	* config.h.in: New.
	* configure.ac: Output PACKAGE infos in config.h.
	* monoburg.c: Add `-v' and `--version' options.
	* Makefile.am: Fix distribution and cleaning rules.
	* monoburg.h: Include `config.h'.
parent 8cb9d1ab
2005-06-04 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
* config.h.in: New.
* configure.ac: Output PACKAGE infos in config.h.
* monoburg.c: Add `-v' and `--version' options.
* Makefile.am: Fix distribution and cleaning rules.
* monoburg.h: Include `config.h'.
2005-06-04 Michael Cadilhac <michael.cadilhac@lrde.epita.fr>
* parser.y: Add a `%include' directive which includes files
......
......@@ -18,7 +18,7 @@ monoburg_LDADD = \
## MonoBURG manual
man_MANS = monoburg.1
EXTRA_DIST = $(man_MANS)
EXTRA_DIST = ChangeLog $(man_MANS)
## Check/Sample
check_PROGRAMS = sample
......@@ -31,4 +31,4 @@ sample.c: monoburg$(EXEEXT) $(srcdir)/sample.brg
sample_SOURCES = sample.brg
sample_LDADD = sample.o $(GLIB_LIBS)
CLEANFILES = sample.c
CLEANFILES = sample.c sample.o parser.c
/* config.h.in. Generated from configure.ac by autoheader. */
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Version number of package */
#undef VERSION
......@@ -5,6 +5,7 @@
## -------------------------------------
## Project
AC_INIT([MonoBURG], [1.0.1])
AM_CONFIG_HEADER([config.h])
## -------------------------------------
## Setup autotools
......
......@@ -1068,9 +1068,9 @@ emit_prototypes ()
output ("int mono_burg_rule (MBState *state, int goal);\n");
if (dag_mode)
output ("MBState **mono_burg_kids (MBState *state, int rulenr, MBState *kids []);\n");
output ("MBState **mono_burg_kids (MBState *state, int rulenr, MBState *kids []);\n");
else
output ("MBTREE_TYPE **mono_burg_kids (MBTREE_TYPE *tree, int rulenr, MBTREE_TYPE *kids []);\n");
output ("MBTREE_TYPE **mono_burg_kids (MBTREE_TYPE *tree, int rulenr, MBTREE_TYPE *kids []);\n");
output ("extern void mono_burg_init (void);\n");
}
......@@ -1142,6 +1142,14 @@ usage ()
exit (1);
}
static void
version ()
{
printf ("%s\n", PACKAGE_STRING);
exit (0);
}
static void
warning_handler (const gchar *log_domain,
GLogLevelFlags log_level,
......@@ -1169,6 +1177,8 @@ main (int argc, char *argv [])
/* Short options */
if (argv [i][1] == 'h') {
usage ();
} else if (argv [i][1] == 'v') {
version ();
} else if (argv [i][1] == 'e') {
dag_mode = 1;
} else if (argv [i][1] == 'p') {
......@@ -1187,9 +1197,11 @@ main (int argc, char *argv [])
/* Long options */
if (strcmp (argv [i] + 2, "without-glib") == 0) {
with_glib = FALSE;
} else if (strcmp (argv [i] + 2, "without-exported-symbols") == 0) {
} else if (strcmp(argv [i] + 2, "version") == 0) {
version ();
} else if (strcmp(argv [i] + 2, "without-exported-symbols") == 0) {
with_exported_symbols = FALSE;
} else if (strcmp (argv [i] + 2, "with-references") == 0) {
} else if (strcmp(argv [i] + 2, "with-references") == 0) {
warn_cpp ("`--with-references' option");
with_references = TRUE;
} else {
......
#ifndef __MONO_MONOBURG_H__
#define __MONO_MONOBURG_H__
#include <config.h>
#include <glib.h>
#define MAX_FDS 10
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment