On Mon, 28 Nov 2011, Stefan Weil wrote: > The broken build can be reproduced with a source path containing at > least one dot. > Source paths without any dot will show no problems. My source path was > ~/src/qemu/qemu.org/qemu.
Sorry for the build break, I didn't have any dots in my source path so I didn't notice it :-/ > File scripts/qapi.py fails to create unique guard names when given a > filename with 2 or more dots: > > def guardname(filename): > if filename.startswith('./'): > filename = filename[2:] > return filename.replace("/", "_").replace("-", > "_").split(".")[0].upper() + '_H' > > The function always returns the same guard name (in my case > _HOME_STEFAN_SRC_QEMU_QEMU_H) > which won't work when used for more than one header file. > > I expect that blanks in the source path will also give unexpected results. > > Even when this function were fixed, I think that > qapi-dir := $(BUILD_DIR)/qapi-generated > would be better. Doing a more careful analysis of the out-of-tree build, I noticed that the system actually works correctly if the source directory is "distclean". I don't think we support building qemu out-of-tree if the source dir hasn't been cleaned properly, so I don't think is worth pursuing this patch anymore. Just be aware that a "make clean" is not enough.