changeset 424:3aad0ff3c3be

Add support for assembler listings in the as wrapper script.
author David Flamand <dflamand@gmail.com>
date Thu, 22 Sep 2016 19:26:04 -0600
parents a3711f5ac569
children 9f0448022f1f
files extra/as
diffstat 1 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/extra/as	Sat May 21 22:06:10 2016 +0200
+++ b/extra/as	Thu Sep 22 19:26:04 2016 -0600
@@ -40,7 +40,6 @@
 output_file=
 list_file=
 options=
-list_file_enabled=n
 
 # Parse the command-line options.  See the GNU 'as' man page for
 # an explanation of all these options.  Our goal is to translate
@@ -70,10 +69,11 @@
 		--)
 			fatal_error "standard input not supported"
 			;;
-#		-a*)
-#			options="${options}lc"
-#			list_file_enabled=y
-#			;;
+		-a*)
+			list_file=${arg#${arg%=*}}
+			list_file=${list_file#=}
+			options="$options -l$list_file"
+			;;
 		-I*)
 			#include_file=${arg#-I}
 			#echo "warning: include path '$include_file' ignored"
@@ -98,10 +98,6 @@
 			# These options are accepted but ignored by GNU as.
 			true
 			;;
-#		=*)
-#			# Set the name of the listing file
-#			list_file=${arg#=}
-#			;;
 		-Qy)
 			# "identify in output" - ignore
 			true
@@ -145,7 +141,7 @@
 
 if [ "$rc" != "0" ]; then
 	cp -p $input_file /tmp/as6809_error.s
-	rm -f $asoutput_file
+	rm -f $output_file $list_file
 	exit $rc
 fi