Index: configure =================================================================== RCS file: /cvsroot/qemu/qemu/configure,v retrieving revision 1.14 diff -u -p -r1.14 configure --- configure 15 Jun 2003 20:25:43 -0000 1.14 +++ configure 15 Jun 2003 21:58:14 -0000 @@ -268,11 +268,11 @@ fi if test "$target_cpu" = "x86" ; then echo "TARGET_ARCH=i386" >> config.mak - echo "#define TARGET_ARCH \"i386\"" >> $TMPH + echo "#define TARGET_ARCH i386" >> $TMPH echo "#define TARGET_I386 1" >> $TMPH elif test "$target_cpu" = "arm" ; then echo "TARGET_ARCH=arm" >> config.mak - echo "#define TARGET_ARCH \"arm\"" >> $TMPH + echo "#define TARGET_ARCH arm" >> $TMPH echo "#define TARGET_ARM 1" >> $TMPH else echo "Unsupported target CPU" Index: main.c =================================================================== RCS file: /cvsroot/qemu/qemu/main.c,v retrieving revision 1.30 diff -u -p -r1.30 main.c --- main.c 15 Jun 2003 20:05:50 -0000 1.30 +++ main.c 15 Jun 2003 21:58:21 -0000 @@ -308,7 +308,7 @@ void usage(void) "debug options:\n" "-d activate log (logfile=%s)\n" "-p pagesize set the host page size to 'pagesize'\n", - TARGET_ARCH, + STR(TARGET_ARCH), interp_prefix, x86_stack_size, DEBUG_LOGFILE); Index: qemu.h =================================================================== RCS file: /cvsroot/qemu/qemu/qemu.h,v retrieving revision 1.16 diff -u -p -r1.16 qemu.h --- qemu.h 15 Jun 2003 20:05:50 -0000 1.16 +++ qemu.h 15 Jun 2003 21:58:29 -0000 @@ -2,12 +2,16 @@ #define GEMU_H #include "thunk.h" +#include "config.h" #include #include "syscall_defs.h" -#include "cpu-" TARGET_ARCH ".h" -#include "syscall-" TARGET_ARCH ".h" +#define STR(x) #x +#define XSTR(x) STR(x) + +#include XSTR(cpu-TARGET_ARCH.h) +#include XSTR(syscall-TARGET_ARCH.h) /* This struct is used to hold certain information about the image. * Basically, it replicates in user space what would be certain Index: translate.c =================================================================== RCS file: /cvsroot/qemu/qemu/translate.c,v retrieving revision 1.2 diff -u -p -r1.2 translate.c --- translate.c 15 Jun 2003 20:25:43 -0000 1.2 +++ translate.c 15 Jun 2003 21:58:37 -0000 @@ -23,21 +23,24 @@ #include #include +#define STR(x) #x +#define XSTR(x) STR(x) + #include "config.h" #define IN_OP_I386 -#include "cpu-" TARGET_ARCH ".h" +#include XSTR(cpu-TARGET_ARCH.h) #include "exec.h" #include "disas.h" enum { #define DEF(s, n, copy_size) INDEX_op_ ## s, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF NB_OPS, }; #include "dyngen.h" -#include "op-" TARGET_ARCH ".h" +#include XSTR(op-TARGET_ARCH.h) uint16_t gen_opc_buf[OPC_BUF_SIZE]; uint32_t gen_opparam_buf[OPPARAM_BUF_SIZE]; @@ -48,13 +51,13 @@ uint8_t gen_opc_instr_start[OPC_BUF_SIZE #ifdef DEBUG_DISAS static const char *op_str[] = { #define DEF(s, n, copy_size) #s, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF }; static uint8_t op_nb_args[] = { #define DEF(s, n, copy_size) n, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF }; @@ -123,7 +126,7 @@ int cpu_gen_code(TranslationBlock *tb, static const unsigned short opc_copy_size[] = { #define DEF(s, n, copy_size) copy_size, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF };