Re: [Qemu-devel] 'make help' generate unrelated files

2017-10-31 Thread Philippe Mathieu-Daudé
On 07/29/2017 06:30 AM, Peter Maydell wrote:
> This happens because we have a rule that says
> "Makefile: $(GENERATED_FILES)"
> which is how we ensure that the autogenerated header
> files are always built before any .c file is compiled.
> The unfortunate side effect is that we rebuild the
> generated files before processing *any* makefile
> target, even those like 'clean' and 'help' that
> don't actually require them.
> 
> I did once have a go at fixing this some years back:
> http://patchwork.ozlabs.org/patch/365288/
> but as you'll note from the last comment by me
> in that mail thread it had a fatal flaw for
> the "build from clean" case...

It's now getting worse, compiling dtc + capstone :)

$ ./configure > /dev/null && time make help
  GEN aarch64-softmmu/config-devices.mak.tmp
  GEN aarch64-softmmu/config-devices.mak
  GEN alpha-softmmu/config-devices.mak.tmp
  GEN alpha-softmmu/config-devices.mak
  GEN arm-softmmu/config-devices.mak.tmp
  GEN arm-softmmu/config-devices.mak
  GEN cris-softmmu/config-devices.mak.tmp
  GEN cris-softmmu/config-devices.mak
  GEN i386-softmmu/config-devices.mak.tmp
  GEN i386-softmmu/config-devices.mak
  GEN lm32-softmmu/config-devices.mak.tmp
  GEN lm32-softmmu/config-devices.mak
  GEN m68k-softmmu/config-devices.mak.tmp
  GEN m68k-softmmu/config-devices.mak
  GEN microblaze-softmmu/config-devices.mak.tmp
  GEN microblaze-softmmu/config-devices.mak
  GEN microblazeel-softmmu/config-devices.mak.tmp
  GEN microblazeel-softmmu/config-devices.mak
  GEN mips-softmmu/config-devices.mak.tmp
  GEN mips-softmmu/config-devices.mak
  GEN mips64-softmmu/config-devices.mak.tmp
  GEN mips64-softmmu/config-devices.mak
  GEN mips64el-softmmu/config-devices.mak.tmp
  GEN mips64el-softmmu/config-devices.mak
  GEN mipsel-softmmu/config-devices.mak.tmp
  GEN mipsel-softmmu/config-devices.mak
  GEN moxie-softmmu/config-devices.mak.tmp
  GEN moxie-softmmu/config-devices.mak
  GEN nios2-softmmu/config-devices.mak.tmp
  GEN nios2-softmmu/config-devices.mak
  GEN or1k-softmmu/config-devices.mak.tmp
  GEN or1k-softmmu/config-devices.mak
  GEN ppc-softmmu/config-devices.mak.tmp
  GEN ppc-softmmu/config-devices.mak
  GEN ppc64-softmmu/config-devices.mak.tmp
  GEN ppc64-softmmu/config-devices.mak
  GEN ppcemb-softmmu/config-devices.mak.tmp
  GEN ppcemb-softmmu/config-devices.mak
  GEN s390x-softmmu/config-devices.mak.tmp
  GEN s390x-softmmu/config-devices.mak
  GEN sh4-softmmu/config-devices.mak.tmp
  GEN sh4-softmmu/config-devices.mak
  GEN sh4eb-softmmu/config-devices.mak.tmp
  GEN sh4eb-softmmu/config-devices.mak
  GEN sparc-softmmu/config-devices.mak.tmp
  GEN sparc-softmmu/config-devices.mak
  GEN sparc64-softmmu/config-devices.mak.tmp
  GEN sparc64-softmmu/config-devices.mak
  GEN tricore-softmmu/config-devices.mak.tmp
  GEN tricore-softmmu/config-devices.mak
  GEN unicore32-softmmu/config-devices.mak.tmp
  GEN unicore32-softmmu/config-devices.mak
  GEN x86_64-softmmu/config-devices.mak.tmp
  GEN x86_64-softmmu/config-devices.mak
  GEN xtensa-softmmu/config-devices.mak.tmp
  GEN xtensa-softmmu/config-devices.mak
  GEN xtensaeb-softmmu/config-devices.mak.tmp
  GEN xtensaeb-softmmu/config-devices.mak
  GEN aarch64-linux-user/config-devices.mak.tmp
  GEN aarch64-linux-user/config-devices.mak
  GEN alpha-linux-user/config-devices.mak.tmp
  GEN alpha-linux-user/config-devices.mak
  GEN arm-linux-user/config-devices.mak.tmp
  GEN arm-linux-user/config-devices.mak
  GEN armeb-linux-user/config-devices.mak.tmp
  GEN armeb-linux-user/config-devices.mak
  GEN cris-linux-user/config-devices.mak.tmp
  GEN cris-linux-user/config-devices.mak
  GEN hppa-linux-user/config-devices.mak.tmp
  GEN hppa-linux-user/config-devices.mak
  GEN i386-linux-user/config-devices.mak.tmp
  GEN i386-linux-user/config-devices.mak
  GEN m68k-linux-user/config-devices.mak.tmp
  GEN m68k-linux-user/config-devices.mak
  GEN microblaze-linux-user/config-devices.mak.tmp
  GEN microblaze-linux-user/config-devices.mak
  GEN microblazeel-linux-user/config-devices.mak.tmp
  GEN microblazeel-linux-user/config-devices.mak
  GEN mips-linux-user/config-devices.mak.tmp
  GEN mips-linux-user/config-devices.mak
  GEN mips64-linux-user/config-devices.mak.tmp
  GEN mips64-linux-user/config-devices.mak
  GEN mips64el-linux-user/config-devices.mak.tmp
  GEN mips64el-linux-user/config-devices.mak
  GEN mipsel-linux-user/config-devices.mak.tmp
  GEN mipsel-linux-user/config-devices.mak
  GEN mipsn32-linux-user/config-devices.mak.tmp
  GEN mipsn32-linux-user/config-devices.mak
  GEN mipsn32el-linux-user/config-devices.mak.tmp
  GEN mipsn32el-linux-user/config-devices.mak
  GEN 

Re: [Qemu-devel] 'make help' generate unrelated files

2017-07-29 Thread Peter Maydell
On 29 July 2017 at 02:55, Philippe Mathieu-Daudé  wrote:
> Is it necessary to generate this files to run 'make help'?
>
> $ ./configure
> [...]
> $ make help
> CHK version_gen.h
> UPD version_gen.h
>  DEP util.c
> CHK version_gen.h

This happens because we have a rule that says
"Makefile: $(GENERATED_FILES)"
which is how we ensure that the autogenerated header
files are always built before any .c file is compiled.
The unfortunate side effect is that we rebuild the
generated files before processing *any* makefile
target, even those like 'clean' and 'help' that
don't actually require them.

I did once have a go at fixing this some years back:
http://patchwork.ozlabs.org/patch/365288/
but as you'll note from the last comment by me
in that mail thread it had a fatal flaw for
the "build from clean" case...

thanks
-- PMM



[Qemu-devel] 'make help' generate unrelated files

2017-07-28 Thread Philippe Mathieu-Daudé

Is it necessary to generate this files to run 'make help'?

$ ./configure
[...]
$ make help
CHK version_gen.h
UPD version_gen.h
 DEP util.c
CHK version_gen.h
  GEN qmp-commands.h
  GEN qapi-types.h
  GEN qapi-visit.h
  GEN qapi-event.h
  GEN qmp-marshal.c
  GEN qapi-types.c
  GEN qapi-visit.c
  GEN qapi-event.c
  GEN qmp-introspect.h
  GEN qmp-introspect.c
  GEN util/trace.h
  GEN crypto/trace.h
  GEN io/trace.h
  GEN migration/trace.h
  GEN block/trace.h
  GEN chardev/trace.h
  GEN hw/block/trace.h
  GEN hw/block/dataplane/trace.h
  GEN hw/char/trace.h
  GEN hw/intc/trace.h
  GEN hw/net/trace.h
  GEN hw/virtio/trace.h
  GEN hw/audio/trace.h
  GEN hw/misc/trace.h
  GEN hw/usb/trace.h
  GEN hw/scsi/trace.h
  GEN hw/nvram/trace.h
  GEN hw/display/trace.h
  GEN hw/input/trace.h
  GEN hw/timer/trace.h
  GEN hw/dma/trace.h
  GEN hw/sparc/trace.h
  GEN hw/sd/trace.h
  GEN hw/isa/trace.h
  GEN hw/mem/trace.h
  GEN hw/i386/trace.h
  GEN hw/9pfs/trace.h
  GEN hw/ppc/trace.h
  GEN hw/pci/trace.h
  GEN hw/s390x/trace.h
  GEN hw/vfio/trace.h
  GEN hw/acpi/trace.h
  GEN hw/arm/trace.h
  GEN hw/alpha/trace.h
  GEN hw/xen/trace.h
  GEN ui/trace.h
  GEN audio/trace.h
  GEN net/trace.h
  GEN target/arm/trace.h
  GEN target/i386/trace.h
  GEN target/mips/trace.h
  GEN target/sparc/trace.h
  GEN target/s390x/trace.h
  GEN target/ppc/trace.h
  GEN qom/trace.h
  GEN linux-user/trace.h
  GEN util/trace.c
  GEN crypto/trace.c
  GEN io/trace.c
  GEN migration/trace.c
  GEN block/trace.c
  GEN chardev/trace.c
  GEN hw/block/trace.c
  GEN hw/block/dataplane/trace.c
  GEN hw/char/trace.c
  GEN hw/intc/trace.c
  GEN hw/net/trace.c
  GEN hw/virtio/trace.c
  GEN hw/audio/trace.c
  GEN hw/misc/trace.c
  GEN hw/usb/trace.c
  GEN hw/scsi/trace.c
  GEN hw/nvram/trace.c
  GEN hw/display/trace.c
  GEN hw/input/trace.c
  GEN hw/timer/trace.c
  GEN hw/dma/trace.c
  GEN hw/sparc/trace.c
  GEN hw/sd/trace.c
  GEN hw/isa/trace.c
  GEN hw/mem/trace.c
  GEN hw/i386/trace.c
  GEN hw/9pfs/trace.c
  GEN hw/ppc/trace.c
  GEN hw/pci/trace.c
  GEN hw/s390x/trace.c
  GEN hw/vfio/trace.c
  GEN hw/acpi/trace.c
  GEN hw/arm/trace.c
  GEN hw/alpha/trace.c
  GEN hw/xen/trace.c
  GEN ui/trace.c
  GEN audio/trace.c
  GEN net/trace.c
  GEN target/arm/trace.c
  GEN target/i386/trace.c
  GEN target/mips/trace.c
  GEN target/sparc/trace.c
  GEN target/s390x/trace.c
  GEN target/ppc/trace.c
  GEN qom/trace.c
  GEN linux-user/trace.c
CHK version_gen.h
Generic targets:
  all - Build all
  dir/file.o  - Build specified target only
  install - Install QEMU, documentation and tools
  ctags/TAGS  - Generate tags file for editors
  cscope  - Generate cscope index

Architecture specific targets:
  subdir-aarch64-softmmu - Build for aarch64-softmmu
  subdir-alpha-softmmu   - Build for alpha-softmmu
  subdir-arm-softmmu - Build for arm-softmmu
...

Phil.