Am 25.08.2013 03:38 schrieb Stefan Tauner: > flashrom won't built nor run as native payload very soon (or ever). This > patch changes a special GNU make variable that allows to select the default > goal which is taken if no goal is given explicitly on the command line. > Normally > this would be the first rule in Makefile, i.e. all. This won't compile if the > target > OS is libpayload, hence change it to "libflashrom.a" in that case. > > Signed-off-by: Stefan Tauner <[email protected]> > --- > refined version to make old men happy by not breaking even older build hosts. > > Makefile | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Makefile b/Makefile > index 3b24bc4..b992790 100644 > --- a/Makefile > +++ b/Makefile > @@ -218,6 +218,16 @@ endif > endif > > ifeq ($(TARGET_OS), libpayload) > +# We want to build libflashrom.a by default here. To override the default > target we need the special GNU make > +# variable DEFAULT_GOAL which is available since 3.81. To support building > on ancient hosts check this first. > +min_version_needed := 3.81 > +ok := $(filter $(min_version_needed), $(firstword $(sort $(MAKE_VERSION) > $(min_version_needed))))
This check is broken because the sort is alphabetic, not numeric: Sort results for make 3.81/3.80: 3.80 Sort results for make 3.81/3.81: 3.81 Sort results for make 3.81/3.82: 3.81 Sort results for make 3.81/3.100: 3.100 Writing a reliable make version check can be done in another patch. > +ifneq ($(ok),) > +ifeq ($(MAKECMDGOALS),) > +.DEFAULT_GOAL := libflashrom.a > +$(info Setting default goal to libflashrom.a) > +endif > +endif > FLASHROM_CFLAGS += -DSTANDALONE > ifeq ($(CONFIG_DUMMY), yes) > UNSUPPORTED_FEATURES += CONFIG_DUMMY=yes This patch without the Make version check is Acked-by: Carl-Daniel Hailfinger <[email protected]> Regards, Carl-Daniel -- http://www.hailfinger.org/ _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
