From 0c4cfc8742c42a9280d8ae263dd066d35ba8cbd8 Mon Sep 17 00:00:00 2001 From: Sagar Karandikar Date: Wed, 15 Feb 2023 17:57:26 -0800 Subject: [PATCH 1/3] Fix input files list emission to avoid bash "too many arguments" error This makes the expansion of "cat $(VLSI_RTL)" happen as a child of the shell that runs the for loop. The existing version will sometimes produce a bash "too many arguments" error because the $(shell cat $(VLSI_RTL)) is expanded first and then passed as a giant command to bash. --- vlsi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlsi/Makefile b/vlsi/Makefile index 0693db7e..339e3c80 100644 --- a/vlsi/Makefile +++ b/vlsi/Makefile @@ -122,7 +122,7 @@ $(SYN_CONF): $(VLSI_RTL) echo "synthesis.inputs:" >> $@ echo " top_module: $(VLSI_TOP)" >> $@ echo " input_files:" >> $@ - for x in $(shell cat $(VLSI_RTL)); do \ + for x in $$(cat $(VLSI_RTL)); do \ echo ' - "'$$x'"' >> $@; \ done From 86abfd1e730e89c0a164ebb2a2c75f0aa8a1b3b0 Mon Sep 17 00:00:00 2001 From: Sagar Karandikar Date: Wed, 15 Feb 2023 18:25:22 -0800 Subject: [PATCH 2/3] Same as fix for Makefile --- vlsi/power.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlsi/power.mk b/vlsi/power.mk index bc7359ee..d55b965f 100644 --- a/vlsi/power.mk +++ b/vlsi/power.mk @@ -30,7 +30,7 @@ $(POWER_RTL_CONF): $(VLSI_RTL) echo "power.inputs:" >> $@ echo " level: rtl" >> $@ echo " input_files:" >> $@ - for x in $(shell cat $(VLSI_RTL)); do \ + for x in $$(cat $(VLSI_RTL)); do \ echo ' - "'$$x'"' >> $@; \ done From 97f576da2a5593dcc908325fd98c7c18a2a55786 Mon Sep 17 00:00:00 2001 From: Sagar Karandikar Date: Wed, 15 Feb 2023 18:26:30 -0800 Subject: [PATCH 3/3] Same as Makefile --- vlsi/sim.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlsi/sim.mk b/vlsi/sim.mk index 65b836cc..5623f9d3 100644 --- a/vlsi/sim.mk +++ b/vlsi/sim.mk @@ -10,7 +10,7 @@ $(SIM_CONF): $(sim_common_files) echo " top_module: $(VLSI_TOP)" >> $@ echo " tb_name: ''" >> $@ # don't specify -top echo " input_files:" >> $@ - for x in $(shell cat $(sim_common_files)); do \ + for x in $$(cat $(sim_common_files)); do \ echo ' - "'$$x'"' >> $@; \ done echo " input_files_meta: 'append'" >> $@