[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] stubdom: modify ioemu linkfarm only if necessary
Juergen Gross, on Tue 13 Dec 2016 16:38:06 +0100, wrote: > Several stubdom libraries are being rebuilt each time a top level make > is called as they depend on stubdom/ioemu/linkfarm.stamp which is > depending on tools/qemu-xen-traditional-dir. Unfortunately this > directory is modified by each "make tools" call. > > This can be avoided by writing stubdom/ioemu/linkfarm.stamp only if > a source file beneath tools/qemu-xen-traditional-dir has been added > or removed. > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> > Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> > --- > V3: use cmp -s as suggested by Wei Liu > > V2: maintain a list of the to be linked files in linkfarm.stamp and > rebuild this list at each make call for detecting any change > --- > stubdom/Makefile | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/stubdom/Makefile b/stubdom/Makefile > index bc49cfe..f858210 100644 > --- a/stubdom/Makefile > +++ b/stubdom/Makefile > @@ -298,9 +298,13 @@ ioemu/linkfarm.stamp: > $(XEN_ROOT)/tools/qemu-xen-traditional-dir > (cd $$src && find * ! -type l -type f $(addprefix ! -name , > \ > '*.[oda1]' 'config-*' config.mak qemu-dm qemu-img-xen > \ > '*.html' '*.pod' > \ > - )) | > \ > - while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done > - touch ioemu/linkfarm.stamp > + )) >linkfarm.stamp.tmp; \ > + cmp -s linkfarm.stamp.tmp linkfarm.stamp && \ > + rm linkfarm.stamp.tmp || { \ > + mv linkfarm.stamp.tmp linkfarm.stamp; \ > + cat linkfarm.stamp | while read f; \ > + do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done; \ > + } > else > export QEMU_ROOT > > -- > 2.10.2 > -- Samuel <studdud> what the fuck is wtf _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |