]> Untitled Git - emu8051.git/commitdiff
Add support for as504 assembler, with output file option
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 3 Dec 2013 02:59:30 +0000 (21:59 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 3 Dec 2013 02:59:30 +0000 (21:59 -0500)
Patch is available here:
http://www.hugovil.com/repository/hvlinux/patches/as504-add-output-file-option.patch

This patch is usefull because it fixes a bug when testing the distribution
in a  separate build directory like when using:
    make distcheck

configure.ac automatically detects if as504 supports the option.

configure.ac
tests/Makefile.am

index 058a47a7ad2e488ca2c4254d644795ad7585e405..8f2f2d0f1c2604dc3ada3e1dd05618ea50052ec5 100644 (file)
@@ -56,6 +56,13 @@ run_tests=no
 AC_CHECK_PROG(AS504_CHECK,as504,yes)
 if test x"$AS504_CHECK" = x"yes" ; then
     run_tests=yes
+
+    dnl Check if as504 has been patched to support option -O:
+    dnl See http://www.hugovil.com/repository/hvlinux/patches/as504-add-output-file-option.patch
+    AS504HV_CHECK=no
+    if as504 2>&1 | grep -q Ooutfile; then
+        AS504HV_CHECK=yes
+    fi
 fi
 
 AC_CHECK_PROG(ASEM51_CHECK,asem,yes)
@@ -68,6 +75,7 @@ if test x"$run_tests" != x"yes" ; then
 fi
 
 AM_CONDITIONAL([RUN_TESTS],[test x"$run_tests" = x"yes"])
+AM_CONDITIONAL([USE_AS504HV],[test x"$AS504HV_CHECK" = x"yes"])
 AM_CONDITIONAL([USE_AS504],[test x"$AS504_CHECK" = x"yes"])
 AM_CONDITIONAL([USE_AS51],[test x"$ASEM51_CHECK" = x"yes"])
 
index 514384f5982b08bc9d2bbf4f3424d0c5c8a29cdc..6c3da202d29cf068d4ac236ababd6679d0af527a 100644 (file)
@@ -30,8 +30,11 @@ TESTS = \
 
 # Tell make how to generate a .hex file from a .asm source file.
 # Warning: make distcheck will fail because asem nor as504 have option to
-# specify output filename (and path):
+# specify output filename (and path), except patched version of as504:
 .asm.hex:
+if USE_AS504HV
+       $(AS504) -Fhex -O$@ $<
+else
 if USE_AS504
        $(AS504) -Fhex $<
 else
@@ -41,6 +44,7 @@ else
        echo error
 endif
 endif
+endif
 
 else
 TESTS =