summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-10-11 22:08:17 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-10-11 22:08:17 (GMT)
commit7fa2dc35ccd305da5a4896a4de8086c0f4db4fca (patch)
treeaca524af0fc92f3ff5331cbbcd32b4952fe7965e /src/arch/arm/v7
parentffc49de3b424d3daf08b5fdeefd4a3ede6defd02 (diff)
Modified and rebuilt targets only when needed.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@412 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7')
-rw-r--r--src/arch/arm/v7/opdefs/Makefile.am14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/arch/arm/v7/opdefs/Makefile.am b/src/arch/arm/v7/opdefs/Makefile.am
index 8a799b1..f2c5a35 100644
--- a/src/arch/arm/v7/opdefs/Makefile.am
+++ b/src/arch/arm/v7/opdefs/Makefile.am
@@ -27,11 +27,19 @@ ARMV7_DEFS = \
all: $(ARMV7_DEFS:.d=.g) untabify_disass fix_includes_in_c finish_disass
fix_includes_in_c:
- find ../opcodes -name '*c' -exec sed -i 's/##INCLUDES##/\n#include "..\/instruction.h"\n#include "..\/..\/instruction.h"\n#include "..\/helpers.h"\n#include "..\/..\/..\/..\/common\/bconst.h"\n\n/' {} \;
+ @for f in `find ../opcodes -name '*c'`; do \
+ if grep -q '##INCLUDES##' $$f; then \
+ $(fix_verbose)sed -i 's/##INCLUDES##/\n#include "..\/instruction.h"\n#include "..\/..\/instruction.h"\n#include "..\/helpers.h"\n#include "..\/..\/..\/..\/common\/bconst.h"\n\n/' $$f; \
+ fi; \
+ done
finish_disass: $(D2C_OUTDIR)/opcodes/opcodes.h
- sed -i 's/##INCLUDES##/#include\ <stdint.h>\n\n#include "..\/..\/..\/instruction.h"/' $<
- if ! grep -q 'endif' $<; then echo -en "\n\n#endif /* _ARCH_ARM_V7_OPCODES_OPCODES_H */\n" >> $< ; fi
+ @if grep -q '##INCLUDES##' $<; then \
+ $(fix2_verbose)sed -i 's/##INCLUDES##/#include\ <stdint.h>\n\n#include "..\/..\/..\/instruction.h"/' $< ; \
+ fi
+ @if ! grep -q 'endif' $<; then \
+ $(fix2_verbose)echo -en "\n\n#endif /* _ARCH_ARM_V7_OPCODES_OPCODES_H */\n" >> $< ; \
+ fi
clean:
rm -f $(ARMV7_DEFS:.d=.g) $(D2C_OUTDIR)/opcodes/*c $(D2C_OUTDIR)/opcodes/opcodes.h