Skip to content

Commit

Permalink
Replace echo -e to printf in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
equation314 committed Apr 27, 2023
1 parent 3bb1cc4 commit 939e63d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ unittest_no_fail_fast:

disk_img:
ifneq ($(wildcard $(DISK_IMG)),)
@echo -e "$(YELLOW_C)warning$(END_C): disk image \"$(DISK_IMG)\" already exists!"
@printf "$(YELLOW_C)warning$(END_C): disk image \"$(DISK_IMG)\" already exists!\n"
else
$(call make_disk_image,fat32,$(DISK_IMG))
endif
Expand Down
2 changes: 1 addition & 1 deletion scripts/make/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else
endif

_cargo_build:
@echo -e " $(GREEN_C)Building$(END_C) App: $(APP_NAME), Arch: $(ARCH), Platform: $(PLATFORM), Language: $(APP_LANG)"
@printf " $(GREEN_C)Building$(END_C) App: $(APP_NAME), Arch: $(ARCH), Platform: $(PLATFORM), Language: $(APP_LANG)\n"
ifeq ($(APP_LANG), rust)
$(call cargo_build,--manifest-path $(APP)/Cargo.toml)
@cp $(rust_elf) $(OUT_ELF)
Expand Down
2 changes: 1 addition & 1 deletion scripts/make/qemu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ ifeq ($(GRAPHIC), n)
endif

define run_qemu
@echo -e " $(CYAN_C)Running$(END_C) $(QEMU) $(qemu_args-y) $(1)"
@printf " $(CYAN_C)Running$(END_C) $(QEMU) $(qemu_args-y) $(1)\n"
@$(QEMU) $(qemu_args-y) $(1)
endef
2 changes: 1 addition & 1 deletion scripts/make/utils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ YELLOW_C := \033[93;1m
END_C := \033[0m

define make_disk_image_fat32
@echo -e " $(GREEN_C)Creating$(END_C) FAT32 disk image \"$(1)\" ..."
@printf " $(GREEN_C)Creating$(END_C) FAT32 disk image \"$(1)\" ...\n"
@dd if=/dev/zero of=$(1) bs=1M count=64
@mkfs.fat -F 32 $(1)
endef
Expand Down
2 changes: 1 addition & 1 deletion ulib/c_libax/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $(APP)/%.o: $(APP)/%.c
$(CC) $(CFLAGS) -c -o $@ $<

$(OUT_ELF): $(app-objs) $(c_lib) $(rust_lib)
@echo -e " $(CYAN_C)Linking$(END_C) $(OUT_ELF)"
@printf " $(CYAN_C)Linking$(END_C) $(OUT_ELF)\n"
$(LD) $(LDFLAGS) $^ -o $@

.PHONY: _gen_feat

0 comments on commit 939e63d

Please sign in to comment.