On Fri, Jun 17, 2011 at 4:16 PM, Mike Frysinger <[email protected]> wrote:
>> If you change src/bsdl/bsdl_bison.y again, you will got the first case
>> again. And then the second case, repeating...
>
> how do you find these issues ? :P
>
> i wonder if it's a bug in make. it shouldnt have looked at bsdl_bison.h until
> after it processed bsdl_bison.c. forcing the objects to also depend on the .c
> file gives correct behavior.
>
> does your patch have the same issue ? also, you'll need to refresh yours as i
> punted bsdl_config.h from latest svn to simplify things further.
My patch also had the same issue. So I took a look. The cause is that
make has no implicit rules for bsdl_bison.h. So if it found
bsdl_bison.h is older than bsdl_sem.lo, it thought that fact could not
be changed. So even bsdl_bison.h was regreneted, make did not recheck
the timestamps of bsdl_bison.h and bsdl_sem.lo. So bsdl_sem.lo didn't
get rebuilt. This can be fixed by providing a dummy recipe for
bsdl_bison.h as below:
bsdl_bison.h: bsdl_bison.c ; @true
The new patch is attached. Because now we can put -Wno-error on
command line, we don't need libsvf_flex.la or libbsdl_flex.la, this
patch also remove them.
Regards,
Jie
2011-06-22 Jie Zhang <[email protected]>
* src/bsdl/Makefile.am (noinst_LTLIBRARIES): Remove libbsdl_flex.la.
(libbsdl_la_SOURCES): Add vhdl_flex.l and bsdl_flex.l.
(libbsdl_flex_la_SOURCES): Remove.
(libbsdl_flex_la_CFLAGS): Remove.
(libbsdl_flex_la-vhdl_flex.$(OBJEXT)): Remove.
(libbsdl_flex_la-bsdl_flex.$(OBJEXT)): Remove.
(bsdl_sem.$(OBJEXT)): Remove.
(vhdl_flex.lo): New target.
(bsdl_flex.lo): New target.
(bsdl_sem.lo): New target.
(bsdl_bison.h): Provide an empty recipe.
(vhdl_bison.h): Likewise.
* src/svf/Makefile.am (noinst_LTLIBRARIES): Remove libsvf_flex.la.
(libsvf_la_SOURCES): Add svf_flex.l.
(libsvf_flex_la_SOURCES): Remove.
(libsvf_flex_la_CFLAGS): Remove.
(libsvf_flex_la-svf_flex.$(OBJEXT)): Remove.
(svf.$(OBJEXT)): Remove.
(svf_flex.lo): New target.
(svf.lo): New target.
(svf_bison.h): Provide an empty recipe.
* src/Makefile.am (liburjtag_la_LIBADD): Don't add svf/libsvf_flex.la
or bsdl/libbsdl_flex.la.
Index: src/bsdl/Makefile.am
===================================================================
--- src/bsdl/Makefile.am (revision 1910)
+++ src/bsdl/Makefile.am (working copy)
@@ -22,19 +22,16 @@
include $(top_srcdir)/Makefile.rules
noinst_LTLIBRARIES = \
- libbsdl.la \
- libbsdl_flex.la
+ libbsdl.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_msg.h \
@@ -46,20 +43,52 @@
AM_CFLAGS = $(WARNINGCFLAGS)
-libbsdl_flex_la_CFLAGS = \
- $(AM_CFLAGS) \
- -Wno-error
-
# additional dependencies
# - *_flex files must be processed after their *_bison counterparts
# to ensure that *_bison.h is present
-libbsdl_flex_la-vhdl_flex.$(OBJEXT): vhdl_bison.h
-libbsdl_flex_la-bsdl_flex.$(OBJEXT): bsdl_bison.h
-bsdl_sem.$(OBJEXT): bsdl_bison.h
-vhdl_bison.h: vhdl_bison.c
-bsdl_bison.h: bsdl_bison.c
+vhdl_flex.lo: vhdl_flex.c vhdl_bison.h
+if am__fastdepCC
+ $(AM_V_CC)$(LTCOMPILE) -Wno-error -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+ $(AM_V_CC) @AM_BACKSLASH@
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) -Wno-error -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+endif
+bsdl_flex.lo: bsdl_flex.c bsdl_bison.h
+if am__fastdepCC
+ $(AM_V_CC)$(LTCOMPILE) -Wno-error -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+ $(AM_V_CC) @AM_BACKSLASH@
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) -Wno-error -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+endif
+
+bsdl_sem.lo: bsdl_sem.c bsdl_bison.h
+if am__fastdepCC
+ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+ $(AM_V_CC) @AM_BACKSLASH@
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) -c -o $@ $<
+endif
+
+bsdl_bison.h: bsdl_bison.c ; @true
+vhdl_bison.h: vhdl_bison.c ; @true
+
AM_LFLAGS = -i
MAINTAINERCLEANFILES = \
Index: src/svf/Makefile.am
===================================================================
--- src/svf/Makefile.am (revision 1910)
+++ src/svf/Makefile.am (working copy)
@@ -24,26 +24,44 @@
AM_YFLAGS = -d
noinst_LTLIBRARIES = \
- libsvf.la \
- libsvf_flex.la
+ libsvf.la
libsvf_la_SOURCES = \
svf_bison.y \
+ svf_flex.l \
svf.h \
svf.c
-libsvf_flex_la_SOURCES = \
- svf_flex.l
+AM_CFLAGS = $(WARNINGCFLAGS)
-libsvf_flex_la-svf_flex.$(OBJEXT) svf.$(OBJEXT): svf_bison.h
-AM_CFLAGS = $(WARNINGCFLAGS)
+svf_flex.lo: svf_flex.c svf_bison.h
+if am__fastdepCC
+ $(AM_V_CC)$(LTCOMPILE) -Wno-error -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+ $(AM_V_CC) @AM_BACKSLASH@
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) -Wno-error -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+endif
-libsvf_flex_la_CFLAGS = \
- $(AM_CFLAGS) \
- -Wno-error
+svf.lo: svf.c svf_bison.h
+if am__fastdepCC
+ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+else
+ $(AM_V_CC) @AM_BACKSLASH@
+if AMDEP
+ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+ $(LTCOMPILE) -c -o $@ $<
+endif
-svf_bison.h: svf_bison.c
+svf_bison.h: svf_bison.c ; @true
MAINTAINERCLEANFILES = \
svf_bison.c \
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revision 1910)
+++ src/Makefile.am (working copy)
@@ -70,12 +70,10 @@
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
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development