X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fqemu%2FMakefile;h=4603b273ee9dbb611ff2c56bcf215d7a06fb1338;hb=9bfdb9f76d95cc0d9e8266f85e244f0fac8f069d;hp=1a736a2972975e102c308d9308aac37b3409d45f;hpb=0eff3e49f89c98f7332cae91cdac296ac5e0ac4b;p=vswitchperf.git diff --git a/src/qemu/Makefile b/src/qemu/Makefile index 1a736a29..4603b273 100755 --- a/src/qemu/Makefile +++ b/src/qemu/Makefile @@ -1,7 +1,7 @@ # makefile to manage qemu package # -# Copyright (c) 2015 OPNFV and Intel Corporation. +# Copyright (c) 2015-2016 OPNFV and Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -24,26 +24,24 @@ include ../package-list.mk WORK_DIR = qemu TAG_DONE_FLAG = $(WORK_DIR)/.$(QEMU_TAG).done +INSTALL_TARGET = force_make force_install CONFIG_CMD = CONFIG_CMD += ./configure CONFIG_CMD += --target-list="x86_64-softmmu" - +QEMU_VANILLA = ../../src_vanilla/qemu +QEMU_CUSE = ../../src_cuse/qemu all: force_make .PHONY: install force_install config force_make -# install depends on make -force_install: force_make - @echo "Finished making $(WORK_DIR) " - config $(WORK_DIR)/Makefile: $(WORK_DIR)/configure $(AT)cd $(WORK_DIR); $(CONFIG_CMD) @echo "Configure done" -INSTALL_TARGET = force_install force_make - force_make: $(WORK_DIR)/Makefile + $(AT)cd $(WORK_DIR) && git pull $(QEMU_URL) $(QEMU_TAG) + $(AT)echo "git pull done" $(AT)$(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS) @echo "Make done" @@ -54,12 +52,15 @@ install: $(INSTALL_TARGET) # hard way to clean and clobber clean: + $(AT)cd $(WORK_DIR) && git clean -xfd *.o clobber: $(AT)rm -rf $(WORK_DIR) + $(AT)rm -rf $(QEMU_VANILLA) + $(AT)rm -rf $(QEMU_CUSE) -# cleanse is for developer who would like to keep the +# distclean is for developer who would like to keep the # clone git repo, saving time to fetch again from url -cleanse: +distclean: $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f test: @@ -72,6 +73,10 @@ $(WORK_DIR)/configure: $(TAG_DONE_FLAG) $(WORK_DIR): $(AT)git clone $(QEMU_URL) + $(AT)mkdir -p $(QEMU_VANILLA) + $(AT)cp -rf ./* $(QEMU_VANILLA) + $(AT)mkdir -p $(QEMU_CUSE) + $(AT)cp -rf ./* $(QEMU_CUSE) $(TAG_DONE_FLAG): $(WORK_DIR) $(AT)cd $(WORK_DIR); git checkout $(QEMU_TAG)