[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH][TOOLS] libfsimage: portability fixes
Aron Griffis writes ("Re: [Xen-devel] [PATCH][TOOLS] libfsimage: portability fixes"): > Christoph Egger wrote: [Wed Mar 26 2008, 10:14:33AM EDT] > > -${CC:-gcc} -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1 > > +if test -z ${CC}; then CC="gcc"; fi > > +${CC} -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1 > > This prevents check-libext2fs from being run outside the > Makefile. It will silently fail compilation if $CC isn't set. > For Bourne shell and cross-platform compatibility, it should be: ${VARIABLE:-defaultvalue} is in SuSv3 (section 2.6.2, `Use Default Values') and has been in many previous standards. Any system whose /bin/sh can't cope is hopelessly broken. > ${CC-cc} -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1 However, in this case, ${VARIABLE-defaultvalue} is an adequate substitute so we should use that. With a default of gcc, since without gcc you're doomed anyway. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |