summaryrefslogtreecommitdiff
path: root/tools/d2c/d2c.mk
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-14 15:52:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-14 15:52:32 (GMT)
commit6178efcee9fc18d11a773827dca8b95304e75731 (patch)
tree77c664dfac355b7af803d33b1afded7925647b6d /tools/d2c/d2c.mk
parentaba51093c8ebe4b0550557281f8d0d025027b1cb (diff)
Used unique identifiers for instructions everywhere.
Diffstat (limited to 'tools/d2c/d2c.mk')
-rw-r--r--tools/d2c/d2c.mk21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/d2c/d2c.mk b/tools/d2c/d2c.mk
index 10bd226..c889fd4 100644
--- a/tools/d2c/d2c.mk
+++ b/tools/d2c/d2c.mk
@@ -29,6 +29,7 @@ fix_verbose_0 = echo " FIX " `basename $$f`;
# FIXED_C_INCLUDES =
# FIXED_H_INCLUDES =
+# FIXED_H_HOOKS_INCLUDES =
SUFFIXES = .g
@@ -51,17 +52,21 @@ finish_headers:
done
fix_includes_in_c_templates:
- @for f in `find $(D2C_OUTDIR) -type f -name '*.c'`; do \
- if grep -q '##INCLUDES##' $$f; then \
- $(fix_verbose)sed -i 's@##INCLUDES##@$(FIXED_C_INCLUDES)@' $$f; \
- fi; \
+ @for f in `find $(D2C_OUTDIR) -type f -name '*.c'`; do \
+ if grep -q '##INCLUDES##' $$f; then \
+ $(fix_verbose)sed -i 's@##INCLUDES##@$(FIXED_C_INCLUDES)@' $$f; \
+ fi; \
done
fix_includes_in_h_templates:
- @for f in `find $(D2C_OUTDIR) -type f -name '*.h'`; do \
- if grep -q '##INCLUDES##' $$f; then \
- $(fix_verbose)sed -i 's@##INCLUDES##@$(FIXED_H_INCLUDES)@' $$f ; \
- fi; \
+ @for f in `find $(D2C_OUTDIR) -type f -name '*.h'`; do \
+ if grep -q '##INCLUDES##' $$f; then \
+ if [ `basename $$f` == "hooks.h" ]; then \
+ $(fix_verbose)sed -i 's@##INCLUDES##@$(FIXED_H_HOOKS_INCLUDES)@' $$f ; \
+ else \
+ $(fix_verbose)sed -i 's@##INCLUDES##@$(FIXED_H_INCLUDES)@' $$f ; \
+ fi; \
+ fi; \
done
# Merci http://www.commandlinefu.com/commands/view/10276/grep-tab-t