blob: 8e3fa60b1be9905268c4f7bdae07102b3b95471b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
* Handling dependencies of SWIG-generated files. -*- outline -*-
** The problem with non-Automade dependencies
Sometimes, the dependencies computed by swig in tcsh/python/.deps and
tcsh/ruby/.deps are void because of some changes in the build
environment (e.g., SWIG has been installed somewhere else since the
last build, and dependencies on SWIG's .swg files are no longer
valid). Hence SWIG wrappers won't build, because of unmet
dependencies.
_build % make -C tcsh/ruby
make: Entering directory `/home/levill_r/src/tc/_build/tcsh/ruby'
make: *** No rule to make target `/home/levill_r/local/share/swig/1.3.29/swig.swg', needed by `tiger_misc-wrap.cc'. Stop.
make: Leaving directory `/home/levill_r/src/tc/_build/tcsh/ruby'
In the previous example, I (Roland) wasn't able to build TCSH/Ruby
because I had updated from SWIG 1.3.29 (installed locally) to 1.3.31
(provided by Debian).
** Solution
Our approach is to provide a target to reset the dependencies (i.e.,
to set them to the initial state set by `configure'). `make
deps-reset' provides that service, erasing dependencies generated by
swig.
_build % make -C tcsh/ruby deps-reset
make: Entering directory `/home/levill_r/src/tc/_build/tcsh/ruby'
make: Leaving directory `/home/levill_r/src/tc/_build/tcsh/ruby'
The build can then proceed.
_build % make -C tcsh/ruby
make: Entering directory `/home/levill_r/src/tc/_build/tcsh/ruby'
if /usr/bin/swig -c++ -ruby -I../../../lib -I../../../src -MD -MF ".deps/tiger_misc-wrap.Tcc" -o tiger_misc-wrap.cc ../../../lib/misc/tiger_misc.i; \
then \
mv -f ".deps/tiger_misc-wrap.Tcc" ".deps/tiger_misc-wrap.Pcc"; \
else \
rm -f ".deps/tiger_misc-wrap.Tcc"; exit 1; \
fi
[...]
Note: I don't know whether Automake is smart enough to handle this
problem gracefully with the dependencies it already handles. If so,
please tell us!
|