sdk/src/sdcc.inc.mk: replaced `awk` with `sed`

This commit is contained in:
Ivan Tatarinov 2021-06-09 14:00:33 +03:00
parent cc7d8fe227
commit 8f0f618591
1 changed files with 2 additions and 2 deletions

View File

@ -99,10 +99,10 @@ install-sdcc: | sdcc/.extracted
for d in $(SDCC_SUBDIRS); do\
if [ $$d = bin ]; then\
find $$d -type f\
| awk '{print gensub(/^(.+)\/([^/]+)/, "$$(DEST)$$(prefix)/\\1/\\2: \\1/\\2 | $$(DEST)$$(prefix)/\\1\n\t$$(INSTALL_PROGRAM) -m 755 $$< $$@", "g")}';\
| sed -Ee 's,^(.+)/([^/]+),$$(DEST)$$(prefix)/\1/\2: \1/\2 | $$(DEST)$$(prefix)/\1\n\t$$(INSTALL_PROGRAM) -m 755 $$< $$@,';\
else\
find $$d -type f\
| awk '{print gensub(/^(.+)\/([^/]+)/, "$$(DEST)$$(prefix)/\\1/\\2: \\1/\\2 | $$(DEST)$$(prefix)/\\1\n\t$$(INSTALL) -m 644 $$< $$@", "g")}';\
| sed -Ee 's,^(.+)/([^/]+),$$(DEST)$$(prefix)/\1/\2: \1/\2 | $$(DEST)$$(prefix)/\1\n\t$$(INSTALL) -m 755 $$< $$@,';\
fi;\
done; } >install.mk;\
$(MAKE) -w -f install.mk DEST=$(DEST) prefix=$(prefix) INSTALL=$(INSTALL) INSTALL_PROGRAM=$(INSTALL_PROGRAM) install