提交 4c3b5a48 编写于 作者: B Blue Swirl

Add scripts directory

Move build and user scripts into scripts directory.
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 8e5977e5
...@@ -47,7 +47,7 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK) ...@@ -47,7 +47,7 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
-include $(SUBDIR_DEVICES_MAK_DEP) -include $(SUBDIR_DEVICES_MAK_DEP)
%/config-devices.mak: default-configs/%.mak %/config-devices.mak: default-configs/%.mak
$(call quiet-command,$(SHELL) $(SRC_PATH)/make_device_config.sh $@ $<, " GEN $@") $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $@ $<, " GEN $@")
@if test -f $@; then \ @if test -f $@; then \
if cmp -s $@.old $@; then \ if cmp -s $@.old $@; then \
mv $@.tmp $@; \ mv $@.tmp $@; \
...@@ -76,7 +76,7 @@ build-all: $(DOCS) $(TOOLS) recurse-all ...@@ -76,7 +76,7 @@ build-all: $(DOCS) $(TOOLS) recurse-all
config-host.h: config-host.h-timestamp config-host.h: config-host.h-timestamp
config-host.h-timestamp: config-host.mak config-host.h-timestamp: config-host.mak
qemu-options.def: $(SRC_PATH)/qemu-options.hx qemu-options.def: $(SRC_PATH)/qemu-options.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS)) SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
...@@ -118,12 +118,12 @@ else ...@@ -118,12 +118,12 @@ else
trace.h: trace.h-timestamp trace.h: trace.h-timestamp
endif endif
trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h") $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")
@cmp -s $@ trace.h || cp $@ trace.h @cmp -s $@ trace.h || cp $@ trace.h
trace.c: trace.c-timestamp trace.c: trace.c-timestamp
trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c") $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")
@cmp -s $@ trace.c || cp $@ trace.c @cmp -s $@ trace.c || cp $@ trace.c
trace.o: trace.c $(GENERATED_HEADERS) trace.o: trace.c $(GENERATED_HEADERS)
...@@ -136,7 +136,7 @@ trace-dtrace.h: trace-dtrace.dtrace ...@@ -136,7 +136,7 @@ trace-dtrace.h: trace-dtrace.dtrace
# rule file. So we use '.dtrace' instead # rule file. So we use '.dtrace' instead
trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace") $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")
@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS) trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
...@@ -160,7 +160,7 @@ qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-ob ...@@ -160,7 +160,7 @@ qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-ob
qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o: $(GENERATED_HEADERS) check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o: $(GENERATED_HEADERS)
...@@ -282,32 +282,32 @@ TEXIFLAG=$(if $(V),,--quiet) ...@@ -282,32 +282,32 @@ TEXIFLAG=$(if $(V),,--quiet)
$(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@") $(call quiet-command,texi2pdf $(TEXIFLAG) -I . $<," GEN $@")
qemu-options.texi: $(SRC_PATH)/qemu-options.hx qemu-options.texi: $(SRC_PATH)/qemu-options.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx qemu-monitor.texi: $(SRC_PATH)/hmp-commands.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx QMP/qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -q < $< > $@," GEN $@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -q < $< > $@," GEN $@")
qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@")
qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
$(call quiet-command, \ $(call quiet-command, \
perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \ perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \
pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \ pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
" GEN $@") " GEN $@")
qemu-img.1: qemu-img.texi qemu-img-cmds.texi qemu-img.1: qemu-img.texi qemu-img-cmds.texi
$(call quiet-command, \ $(call quiet-command, \
perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \ perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \
pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \ pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
" GEN $@") " GEN $@")
qemu-nbd.8: qemu-nbd.texi qemu-nbd.8: qemu-nbd.texi
$(call quiet-command, \ $(call quiet-command, \
perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \ perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \
pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
" GEN $@") " GEN $@")
......
...@@ -52,7 +52,7 @@ TARGET_TYPE=system ...@@ -52,7 +52,7 @@ TARGET_TYPE=system
endif endif
$(QEMU_PROG).stp: $(QEMU_PROG).stp:
$(call quiet-command,sh $(SRC_PATH)/tracetool \ $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \
--$(TRACE_BACKEND) \ --$(TRACE_BACKEND) \
--binary $(bindir)/$(QEMU_PROG) \ --binary $(bindir)/$(QEMU_PROG) \
--target-arch $(TARGET_ARCH) \ --target-arch $(TARGET_ARCH) \
...@@ -344,14 +344,14 @@ $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) ...@@ -344,14 +344,14 @@ $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
$(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)) $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
hmp-commands.h: $(SRC_PATH)/hmp-commands.hx hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
qmp-commands.h: $(SRC_PATH)/qmp-commands.hx qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
clean: clean:
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
......
...@@ -2266,7 +2266,7 @@ fi ...@@ -2266,7 +2266,7 @@ fi
########################################## ##########################################
# check if trace backend exists # check if trace backend exists
sh "$source_path/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
if test "$?" -ne 0 ; then if test "$?" -ne 0 ; then
echo echo
echo "Error: invalid trace backend" echo "Error: invalid trace backend"
......
...@@ -38,7 +38,7 @@ int gdbserver_start(int); ...@@ -38,7 +38,7 @@ int gdbserver_start(int);
int gdbserver_start(const char *port); int gdbserver_start(const char *port);
#endif #endif
/* in gdbstub-xml.c, generated by feature_to_c.sh */ /* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */
extern const char *const xml_builtin[][2]; extern const char *const xml_builtin[][2];
#endif #endif
...@@ -23,7 +23,7 @@ build-all: multiboot.bin linuxboot.bin ...@@ -23,7 +23,7 @@ build-all: multiboot.bin linuxboot.bin
$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@," Building $(TARGET_DIR)$@") $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@," Building $(TARGET_DIR)$@")
%.bin: %.raw %.bin: %.raw
$(call quiet-command,$(SHELL) $(SRC_PATH)/pc-bios/optionrom/signrom.sh $< $@," Signing $(TARGET_DIR)$@") $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/signrom.sh $< $@," Signing $(TARGET_DIR)$@")
clean: clean:
rm -f *.o *.d *.raw *.img *.bin *~ rm -f *.o *.d *.raw *.img *.bin *~
...@@ -2132,7 +2132,7 @@ Then you can launch the precompiled @file{ls} x86 executable: ...@@ -2132,7 +2132,7 @@ Then you can launch the precompiled @file{ls} x86 executable:
@example @example
qemu-i386 tests/i386/ls qemu-i386 tests/i386/ls
@end example @end example
You can look at @file{qemu-binfmt-conf.sh} so that You can look at @file{scripts/qemu-binfmt-conf.sh} so that
QEMU is automatically launched by the Linux kernel when you try to QEMU is automatically launched by the Linux kernel when you try to
launch x86 executables. It requires the @code{binfmt_misc} module in the launch x86 executables. It requires the @code{binfmt_misc} module in the
Linux kernel. Linux kernel.
......
...@@ -57,7 +57,7 @@ find-in-path = $(if $(find-string /, $1), \ ...@@ -57,7 +57,7 @@ find-in-path = $(if $(find-string /, $1), \
@test -f $@ || cp $< $@ @test -f $@ || cp $< $@
%.h-timestamp: %.mak %.h-timestamp: %.mak
$(call quiet-command, sh $(SRC_PATH)/create_config < $< > $@, " GEN $*.h") $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, " GEN $*.h")
@cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
# will delete the target of a rule if commands exit with a nonzero exit status # will delete the target of a rule if commands exit with a nonzero exit status
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册