scripts/addToolsVersion: properly handle .in vs. .in.2
While most components have their version in the .in file, some
have it in the .in.2 (eg. elf2flt).
Currently, to handle this case, we indiscriminately munge both files,
but this is wrong: in the elf2flt case, if we add a binutils version,
we do not want it to be added to elf2flt, and conversely.
So, for each tool, we need to explicitly know what file to munge.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
1 # Makefile for each steps
2 # Copyright 2006 Yann E. MORIN <yann.morin.1998@free.fr>
4 # ----------------------------------------------------------
5 # This is the steps help entry
8 @echo ' list-steps - List all build steps'
11 @echo ' STOP=step - Stop the build just after this step (list with list-steps)'
12 @echo ' RESTART=step - Restart the build just before this step (list with list-steps)'
14 # ----------------------------------------------------------
17 # The _for_build steps are noop for native and cross,
18 # but are actual steps for canadian and cross-native.
19 # Please keep the last line with a '\' and keep the following empy line:
20 # it helps when diffing and merging.
21 CT_STEPS := libc_check_config \
22 companion_libs_for_build \
24 companion_libs_for_host \
40 # Keep an empty line above this comment, so the last
41 # back-slash terminated line works as expected.
43 # Make the list available to sub-processes (scripts/crosstool-NG.sh needs it)
46 # Print the steps list
49 @echo 'Available build steps, in order:'
50 @for step in $(CT_STEPS); do \
53 @echo 'Use "<step>" as action to execute only that step.'
54 @echo 'Use "+<step>" as action to execute up to that step.'
55 @echo 'Use "<step>+" as action to execute from that step onward.'
57 # ----------------------------------------------------------
58 # This part deals with executing steps
61 $(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$@ STOP=$@ build
63 $(patsubst %,+%,$(CT_STEPS)):
64 $(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) STOP=$(patsubst +%,%,$@) build
66 $(patsubst %,%+,$(CT_STEPS)):
67 $(SILENT)$(MAKE) -rf $(CT_NG) V=$(V) RESTART=$(patsubst %+,%,$@) build