bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with new test case.


From: Kaz Kylheku
Subject: Re: Help with new test case.
Date: Sat, 05 Sep 2020 12:41:52 -0700
User-agent: Roundcube Webmail/0.9.2

On 2020-09-05 00:59, Kaz Kylheku wrote:
Hi,

I'm trying to add a test case in the form of a new entry in examples/c.

I moved all the build rules into local.mk, and got it to work.

'examples/c/buildscenario/buildscenario.c', needed by
'examples/c/buildscenario/examples_c_buildscenario_buildscenario-buildscenario.o'.
  Stop.

This seems to have been solved using:

   nodist_%C%_buildscenario_OBJECTS = %D%/y.tab.o %D%/main.o

The entire local.mk looks like this. It builds, and the executable
examples/c/buildscenario/buildscenario is produced.

Only problem is that when the test is executed, it fails.
If I add a "ls -l" to the test script, it shows that the temporary
test directory that it is running in such as /home/kaz/bison/22392.dir
is empty; the executable isn't being propagated into it.

I can't see what the other local.mk files are doing to bring that
about, that mine isn't.

local.mk follows.


buildscenariodir = $(docdir)/%D%

check_PROGRAMS += %D%/buildscenario

dist_buildscenario_DATA = %D%/parser.y %D%/parser.h %D%/main.c %D%/Makefile %D%
nodist_%C%_buildscenario_SOURCES = %D%/parse.y %D%/main.c %D%/parse.h
nodist_%C%_buildscenario_OBJECTS = %D%/y.tab.o %D%/main.o

TESTS += %D%/buildscenario.test
EXTRA_DIST += %D%/buildscenario.test

CLEANDIRS += %D%/*.dSYM
CLEANFILES += $(%C%_buildscenario_buildscenario_OBJECTS)

buildscenario_CPPFLAGS =
buildscenario_CFLAGS = $(TEST_CFLAGS) \
                       -W -Wall -ansi -pedantic \
                       -Werror=implicit-function-declaration \
                       -Werror=missing-prototypes \
                       -Werror=strict-prototypes

buildscenario_BISON = bison --yacc
buildscenario_BISONFLAGS = -Wno-deprecated

%D%/y.tab.c: %D%/parser.y
        $(buildscenario_BISON) $(buildscenario_BISONFLAGS) -v -d $<
        @# workaround for Bison 3.x: yyparse declared in y.tab.h
        sed -e /yyparse/d < y.tab.h > y.tab.h.tmp
        mv y.tab.h.tmp %D%/y.tab.h
        mv y.tab.c %D%/y.tab.c
        mv y.output %D%/y.output

%D%/main.o: %D%/parser.h

%D%/y.tab.o: %D%/parser.h %D%/y.tab.h




reply via email to

[Prev in Thread] Current Thread [Next in Thread]