Add automake magic to avoid -Werror for flex-generated files

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1584 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent 62fe7ae483
commit 3b07f4f4fb

@ -1,3 +1,10 @@
2009-05-09 Rutger Hofman <rfhh>
* configure.ac, **/Makefile.am: Add automake magic to have -Werror except
in the flex-generated files. See the automake FAQ:
http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html#Flag-Variables-Ordering
Only setting -Wno-error=unused-function doesn't work for some gcc-s.
2009-05-09 Arnim Laeuger <arniml>
* src/bsdl/Makefile.am, src/svf/Makefile.am: avoid -Werror to bail out because
@ -7,7 +14,7 @@
src/svf/svf_bison.y, src/svf/svf.h, src/svf/svf_flex.l:
replace print_progress with DETAIL log level
2009-05-05 Rutger Hofman <rfhh>
2009-05-07 Rutger Hofman <rfhh>
* src/flash/, src/svf/, src/tap/*.c, src/tap/parallel/, src/tap/usbconn:
replace calls to printf() with calls to urj_log() and urj_error_set()

@ -266,7 +266,8 @@ AS_IF([test "x$with_inpout32" = xyes], [
])
CFLAGS="$CFLAGS -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith"
WARNINGCFLAGS="-Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith"
AC_SUBST(WARNINGCFLAGS)
CPPFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $CPPFLAGS"

@ -66,10 +66,12 @@ liburjtag_la_LIBADD = \
if ENABLE_SVF
liburjtag_la_LIBADD += svf/libsvf.la
liburjtag_la_LIBADD += svf/libsvf_flex.la
endif
if ENABLE_BSDL
liburjtag_la_LIBADD += bsdl/libbsdl.la
liburjtag_la_LIBADD += bsdl/libbsdl_flex.la
endif
if ENABLE_JIM
@ -78,3 +80,5 @@ endif
localedir = $(datadir)/locale
INCLUDES = -DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = $(WARNINGCFLAGS)

@ -35,3 +35,5 @@ jtag_LDADD = \
localedir = $(datadir)/locale
INCLUDES = -DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = $(WARNINGCFLAGS)

@ -22,16 +22,20 @@
include $(top_srcdir)/Makefile.rules
OBJEXT = lo
noinst_LTLIBRARIES = libbsdl.la
noinst_LTLIBRARIES = \
libbsdl.la \
libbsdl_flex.la
libbsdl_la_SOURCES = \
vhdl_bison.y \
vhdl_flex.l \
bsdl_bison.y \
bsdl_flex.l \
bsdl.c \
bsdl_sem.c
libbsdl_flex_la_SOURCES = \
vhdl_flex.l \
bsdl_flex.l
noinst_HEADERS = \
bsdl_bison.h \
bsdl_config.h \
@ -42,9 +46,12 @@ noinst_HEADERS = \
vhdl_bison.h \
vhdl_parser.h
# avoid -Werror to bail out because of unused input() function
# in vhdl_flex.c and bsdl_flex.c
libbsdl_la_CFLAGS = -Wno-error=unused-function
AM_CFLAGS = $(WARNINGCFLAGS)
libbsdl_flex_la_CFLAGS = \
$(AM_CFLAGS) \
-Wno-unused-function \
-Werror=missing-prototypes -Wno-error=missing-prototypes
# additional dependencies
# - all files depend on bsdl_config.h which dynamically generated

@ -140,21 +140,6 @@ LEGAL NOTICES:
#define YY_EXTRA_TYPE urj_bsdl_scan_extra_t *
// @@@@ RFHH: take these out after the refactor
// Prototypes that flex should have added, functions that flex should have
// called or not declared:
int urj_bsdl_get_column (yyscan_t yyscanner);
void urj_bsdl_set_column (int column_no , yyscan_t yyscanner);
static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner);
void urj_bsdl_use_yyunput (yyscan_t yyscanner);
void urj_bsdl_use_yyunput (yyscan_t yyscanner)
{
yyunput (0, NULL, yyscanner);
}
// @@@@ RFHH: take these out after the refactor
static char *new_string (urj_bsdl_scan_extra_t *, const char *);
#define BINARY 0

@ -142,21 +142,6 @@ LEGAL NOTICES:
#define YY_EXTRA_TYPE urj_bsdl_scan_extra_t *
// @@@@ RFHH: take these out after the refactor
// Prototypes that flex should have added, functions that flex should have
// called or not declared:
int urj_vhdl_get_column (yyscan_t yyscanner);
void urj_vhdl_set_column (int column_no , yyscan_t yyscanner);
static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner);
void urj_vhdl_use_yyunput (yyscan_t yyscanner);
void urj_vhdl_use_yyunput (yyscan_t yyscanner)
{
yyunput (0, NULL, yyscanner);
}
// @@@@ RFHH: take these out after the refactor
static char *new_string (urj_bsdl_scan_extra_t *, const char *);
#define BINARY 0

@ -177,3 +177,5 @@ endif
if ENABLE_BUS_ZEFANT_XS3
libbus_la_SOURCES += zefant-xs3.c
endif
AM_CFLAGS = $(WARNINGCFLAGS)

@ -71,3 +71,5 @@ endif
if ENABLE_BSDL
libcmd_la_SOURCES += cmd_bsdl.c
endif
AM_CFLAGS = $(WARNINGCFLAGS)

@ -39,3 +39,4 @@ libflash_la_SOURCES += \
jedec_exp.c
endif
AM_CFLAGS = $(WARNINGCFLAGS)

@ -31,3 +31,5 @@ libglobal_la_SOURCES = \
data_dir.c
AM_CPPFLAGS = -DJTAG_BIN_DIR=\"$(bindir)\" -DJTAG_DATA_DIR=\"$(pkgdatadir)\"
AM_CFLAGS = $(WARNINGCFLAGS)

@ -29,3 +29,5 @@ libjim_la_SOURCES = \
jim_tap.c \
some_cpu.c \
intel_28f800b3.c
AM_CFLAGS = $(WARNINGCFLAGS)

@ -42,3 +42,5 @@ endif
libjtaglib_la_SOURCES = \
fclock.c \
$(libiberty_sources)
AM_CFLAGS = $(WARNINGCFLAGS)

@ -31,3 +31,5 @@ libpart_la_SOURCES = \
data_register.c \
bsbit.c \
part.c
AM_CFLAGS = $(WARNINGCFLAGS)

@ -24,19 +24,27 @@ include $(top_srcdir)/Makefile.rules
AM_YFLAGS = -d
OBJEXT = lo
noinst_LTLIBRARIES = libsvf.la
noinst_LTLIBRARIES = \
libsvf.la \
libsvf_flex.la
libsvf_la_SOURCES = \
svf_bison.y \
svf_flex.l \
svf.h \
svf.c
# avoid -Werror to bail out because of unused input() function in svf_flex.c
libsvf_la_CFLAGS = -Wno-error=unused-function
libsvf_flex_la_SOURCES = \
svf_flex.l
svf_flex.$(OBJEXT) svf.$(OBJEXT): svf_bison.$(OBJEXT)
AM_CFLAGS = $(WARNINGCFLAGS)
libsvf_flex_la_CFLAGS = \
$(AM_CFLAGS) \
-Wno-unused-function \
-Werror=missing-prototypes -Wno-error=missing-prototypes
svf_bison.h: svf_bison.c
MAINTAINERCLEANFILES = \

@ -55,26 +55,11 @@ static void fix_yylloc(YYLTYPE *, char *);
static void fix_yylloc_nl(YYLTYPE *, char *, YY_EXTRA_TYPE);
static void progress_nl(YYLTYPE *, YY_EXTRA_TYPE);
// @@@@ RFHH: take these out after the refactor
// Prototypes that flex should have added, functions that flex should have
// called or not declared:
int urj_svf_get_column (yyscan_t yyscanner);
void urj_svf_set_column (int column_no , yyscan_t yyscanner);
static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner);
void urj_svf_use_yyunput (yyscan_t yyscanner);
void urj_svf_use_yyunput (yyscan_t yyscanner)
{
yyunput (0, NULL, yyscanner);
}
int yywrap(yyscan_t scanner);
int yywrap(yyscan_t scanner)
{
return(1);
}
// @@@@ RFHH: take these out after the refactor
#define YY_USER_INIT \
do { \

@ -162,3 +162,5 @@ if ENABLE_CABLE_EP9307
libtap_la_SOURCES += \
cable/vision_ep9307.c
endif
AM_CFLAGS = $(WARNINGCFLAGS)

Loading…
Cancel
Save