]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/rtems.omk
Allow use alternative to default system SED program - SED4OMK.
[omk.git] / snippets / rtems.omk
index eada9928ac2a80fc873b0c1f78d9c2a2fb63ba75..97a123cb1fe50fbcad3272bcc0645486d72574f4 100644 (file)
@@ -119,7 +119,7 @@ S_o_COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 
 # Check GCC version for user build
 ifndef CC_MAJOR_VERSION
-CC_MAJOR_VERSION := $(shell $(CC) -dumpversion | sed -e 's/\([^.]\)\..*/\1/')
+CC_MAJOR_VERSION := $(shell $(CC) -dumpversion | $(SED4OMK) -e 's/\([^.]\)\..*/\1/')
 endif
 # Prepare suitable define for dependency building
 ifeq ($(CC_MAJOR_VERSION),2)
@@ -173,15 +173,15 @@ $(2): $(1)
 # Bellow, the tricks with redirection are for shells without set -o pipefail
 # (see http://www.mail-archive.com/dash@vger.kernel.org/msg00149.html)
        $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) $$<; echo $$$$? >&4; }\
-               | sed -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2cond_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
+               | $(SED4OMK) -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2cond_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
                | sort >>$$@.tmp` && exit $$$$status
        $(Q)echo >>$$@.tmp '/* Defines from the values defined to symbols in hexadecimal format */'
        $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) $$<; echo $$$$? >&4; }\
-               | sed -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2def_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
+               | $(SED4OMK) -n 's/^ *0*\(0[0-9A-Fa-f]*\) *A *_cmetric2def_\([A-Za-z_0-9]*\) */#define \2 0x\1/p' \
                | sort >>$$@.tmp` && exit $$$$status
        $(Q)echo >>$$@.tmp '/* Defines from the values defined to symbols in decimal format */'
        $(Q)exec 3>&1; status=`exec 4>&1 >&3; { $(NM) -td $$<; echo $$$$? >&4; }\
-               | sed -n 's/^ *0*\(0\|[1-9][0-9]*\) *A *_cmetric2defdec_\([A-Za-z_0-9]*\) */#define \2 \1/p' \
+               | $(SED4OMK) -n 's/^ *0*\(0\|[1-9][0-9]*\) *A *_cmetric2defdec_\([A-Za-z_0-9]*\) */#define \2 \1/p' \
                | sort >>$$@.tmp` && exit $$$$status
        $(Q)mv $$@.tmp $$@
 endef
@@ -224,7 +224,7 @@ $(2)/$(1): $$($(1)_OBJS)
          $$(AM_LDFLAGS) $$(LDFLAGS) $$($(1)_OBJS) $$(LOADLIBES) $$($(1)_LIBS:%=-l%) \
          -o $(2)/$(1)
 #@echo "$(2)/$(1): \\" >$(USER_OBJS_DIR)/$(1).exe.d
-#@sed -n -e 's/^LOAD \(.*\)$$$$/  \1  \\/p' $(USER_OBJS_DIR)/$(1).exe.map  >>$(USER_OBJS_DIR)/$(1).exe.d
+#@$(SED4OMK) -n -e 's/^LOAD \(.*\)$$$$/  \1  \\/p' $(USER_OBJS_DIR)/$(1).exe.map  >>$(USER_OBJS_DIR)/$(1).exe.d
 #@echo >>$(USER_OBJS_DIR)/$(1).exe.d
 #-Wl,-Map,$(USER_OBJS_DIR)/$(1).exe.map
 # FIXME: Why the map file was commented out?