build: Fix out-of-tree with --disable-dependency-tracking configure flag

After bootstrapping build, if we want to do an out-of-tree build (ie: in the
OOT-build dir) we have a build failure because build system relies on
the OOT-build/src directory exists

```sh
./bootstrap
mkdir OOT-build
cd OOT-build
../configure --disable-dependency-tracking --<flag1> --<flag2> ...
make
$ LANG=C make
cat ../src/helper/startup.tcl ../src/jtag/startup.tcl ../src/target/startup.tcl ../src/server/startup.tcl ../src/flash/startup.tcl | ../src/helper/bin2char.sh > src/startup_tcl.inc || { rm -f src/startup_tcl.inc; false; }
/bin/bash: line 1: src/startup_tcl.inc: No such file or directory
make: *** [Makefile:6603: src/startup_tcl.inc] Error 1
```

These kind of errors are fixed indicating relevant directory creation in
Makefile.am before actually relying on it.

Change-Id: I8185fd41ef942184597dc4c0092796034572cbe1
Signed-off-by: Raúl Sánchez Siles <rasasi78@gmail.com>
Reviewed-on: http://openocd.zylin.com/6106
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Raúl Sánchez Siles 2021-03-15 13:53:17 +01:00 committed by Antonio Borneo
parent 6405d35f32
commit a5b5907506
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ BUILT_SOURCES += %D%/startup_tcl.inc
# Convert .tcl to c-array
%D%/startup_tcl.inc: $(STARTUP_TCL_SRCS)
mkdir -p %D%
cat $^ | $(BIN2C) > $@ || { rm -f $@; false; }
# add generated files to make clean list