Commit ad06484063972abdf3f426412af9aa101bea26a8

Authored by pbrook
1 parent 115defd1

Fix out of tree builds.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1814 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile
1 --include config-host.mak 1 +include config-host.mak
2 2
3 -CFLAGS=-Wall -O2 -g -fno-strict-aliasing 3 +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I.
4 ifdef CONFIG_DARWIN 4 ifdef CONFIG_DARWIN
5 CFLAGS+= -mdynamic-no-pic 5 CFLAGS+= -mdynamic-no-pic
6 endif 6 endif
@@ -47,18 +47,19 @@ install: all @@ -47,18 +47,19 @@ install: all
47 mkdir -p "$(DESTDIR)$(bindir)" 47 mkdir -p "$(DESTDIR)$(bindir)"
48 install -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" 48 install -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
49 mkdir -p "$(DESTDIR)$(datadir)" 49 mkdir -p "$(DESTDIR)$(datadir)"
50 - install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \  
51 - pc-bios/vgabios-cirrus.bin \  
52 - pc-bios/ppc_rom.bin pc-bios/video.x \  
53 - pc-bios/proll.elf \  
54 - pc-bios/linux_boot.bin "$(DESTDIR)$(datadir)" 50 + for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
  51 + video.x proll.elf linux_boot.bin; do \
  52 + install -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
  53 + done
55 mkdir -p "$(DESTDIR)$(docdir)" 54 mkdir -p "$(DESTDIR)$(docdir)"
56 install -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" 55 install -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
57 ifndef CONFIG_WIN32 56 ifndef CONFIG_WIN32
58 mkdir -p "$(DESTDIR)$(mandir)/man1" 57 mkdir -p "$(DESTDIR)$(mandir)/man1"
59 install qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" 58 install qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
60 mkdir -p "$(DESTDIR)$(datadir)/keymaps" 59 mkdir -p "$(DESTDIR)$(datadir)/keymaps"
61 - install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(DESTDIR)$(datadir)/keymaps" 60 + for x in $(KEYMAPS); do \
  61 + install -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
  62 + done
62 endif 63 endif
63 for d in $(TARGET_DIRS); do \ 64 for d in $(TARGET_DIRS); do \
64 $(MAKE) -C $$d $@ || exit 1 ; \ 65 $(MAKE) -C $$d $@ || exit 1 ; \
@@ -81,11 +82,11 @@ cscope: @@ -81,11 +82,11 @@ cscope:
81 texi2html -monolithic -number $< 82 texi2html -monolithic -number $<
82 83
83 qemu.1: qemu-doc.texi 84 qemu.1: qemu-doc.texi
84 - ./texi2pod.pl $< qemu.pod 85 + $(SRC_PATH)/texi2pod.pl $< qemu.pod
85 pod2man --section=1 --center=" " --release=" " qemu.pod > $@ 86 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
86 87
87 qemu-img.1: qemu-img.texi 88 qemu-img.1: qemu-img.texi
88 - ./texi2pod.pl $< qemu-img.pod 89 + $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
89 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ 90 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
90 91
91 FILE=qemu-$(shell cat VERSION) 92 FILE=qemu-$(shell cat VERSION)
Makefile.target
@@ -12,7 +12,7 @@ TARGET_BASE_ARCH:=sparc @@ -12,7 +12,7 @@ TARGET_BASE_ARCH:=sparc
12 endif 12 endif
13 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) 13 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
14 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio 14 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
15 -DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH) 15 +DEFINES=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH)
16 ifdef CONFIG_USER_ONLY 16 ifdef CONFIG_USER_ONLY
17 VPATH+=:$(SRC_PATH)/linux-user 17 VPATH+=:$(SRC_PATH)/linux-user
18 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) 18 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
configure
@@ -139,14 +139,16 @@ if [ &quot;$bsd&quot; = &quot;yes&quot; ] ; then @@ -139,14 +139,16 @@ if [ &quot;$bsd&quot; = &quot;yes&quot; ] ; then
139 fi 139 fi
140 140
141 # find source path 141 # find source path
142 -# XXX: we assume an absolute path is given when launching configure,  
143 -# except in './configure' case.  
144 -source_path=${0%configure}  
145 -source_path=${source_path%/}  
146 -source_path_used="yes"  
147 -if test -z "$source_path" -o "$source_path" = "." ; then 142 +source_path=`dirname "$0"`
  143 +if [ -z "$source_path" ]; then
148 source_path=`pwd` 144 source_path=`pwd`
  145 +else
  146 + source_path=`cd "$source_path"; pwd`
  147 +fi
  148 +if test "$source_path" = `pwd` ; then
149 source_path_used="no" 149 source_path_used="no"
  150 +else
  151 + source_path_used="yes"
150 fi 152 fi
151 153
152 for opt do 154 for opt do
@@ -158,6 +160,7 @@ for opt do @@ -158,6 +160,7 @@ for opt do
158 --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2` 160 --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2`
159 ;; 161 ;;
160 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` 162 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
  163 + source_path_used="yes"
161 ;; 164 ;;
162 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2` 165 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
163 ;; 166 ;;
@@ -615,6 +618,9 @@ head $source_path/VERSION &gt;&gt; $config_h @@ -615,6 +618,9 @@ head $source_path/VERSION &gt;&gt; $config_h
615 echo "\"" >> $config_h 618 echo "\"" >> $config_h
616 619
617 echo "SRC_PATH=$source_path" >> $config_mak 620 echo "SRC_PATH=$source_path" >> $config_mak
  621 +if [ "$source_path_used" = "yes" ]; then
  622 + echo "VPATH=$source_path" >> $config_mak
  623 +fi
618 echo "TARGET_DIRS=$target_list" >> $config_mak 624 echo "TARGET_DIRS=$target_list" >> $config_mak
619 625
620 # XXX: suppress that 626 # XXX: suppress that