On Tue, 2009-10-20 at 08:58 +0200, Øyvind Harboe wrote:
> On Tue, Oct 20, 2009 at 2:30 AM, David Brownell <[email protected]> wrote:
> > On Monday 19 October 2009, Øyvind Harboe wrote:
[snip]
> >> - there can be hard to track errors such as bin2char being
> >> left in src/helper and subsequently trying to use build !=
> >> src dir will fail.
> >
> > You mean build/src/helper or source/src/helper??
>
> if you have a file in source/src/helper/bin2char, then
> a subsequent build w/build_dir != src_dir will fail.
Does this patch fix this particular problem for you?
I expect the best solution is "always run 'make distclean' before
switching away from src_dir == build_dir".
--Z
diff --git a/src/helper/Makefile.am b/src/helper/Makefile.am
index 67250a1..b12d400 100644
--- a/src/helper/Makefile.am
+++ b/src/helper/Makefile.am
@@ -48,22 +48,24 @@ noinst_HEADERS = \
fileio.h \
jim.h \
jim-eventloop.h \
- system.h \
+ system.h
+
+EXTRA_DIST = \
startup.tcl \
bin2char.c
-BIN2C = bin2char$(EXEEXT_FOR_BUILD)
+BIN2C = $(builddir)/bin2char$(EXEEXT_FOR_BUILD)
BUILT_SOURCES = $(BIN2C)
-$(BIN2C): bin2char.c
- ${CC_FOR_BUILD} ${CFLAGS_FOR_BUILD} $(srcdir)/bin2char.c -o $@
+$(BIN2C): $(srcdir)/bin2char.c
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ $<
# Convert .tcl to cfile
-startup_tcl.c: startup.tcl $(BIN2C)
- ./$(BIN2C) startup_tcl < $(srcdir)/startup.tcl > $@
+startup_tcl.c: $(srcdir)/startup.tcl $(BIN2C)
+ $(BIN2C) startup_tcl < $(srcdir)/startup.tcl > $@
# add startup_tcl.c to make clean list
-CLEANFILES = startup_tcl.c bin2char$(EXEEXT_FOR_BUILD)
+CLEANFILES = startup_tcl.c $(BIN2C)
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development