From 1b6769f6a547daf6522e03f0ed9921e74c28176b Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Tue, 11 Jan 2011 17:49:16 +0000 Subject: [PATCH] Trying to detect whether 'gperf' is installed, and if not, abort build. --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ff82ed497..b9fd2367b 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Tux Paint - A simple drawing program for children. -# Copyright (c) 2002-2010 by Bill Kendrick and others +# Copyright (c) 2002-2011 by Bill Kendrick and others # bill@newbreedsoftware.com # http://www.tuxpaint.org/ -# June 14, 2002 - April 27, 2010 +# June 14, 2002 - January 11, 2011 # The version number, for release: @@ -960,12 +960,17 @@ obj/tuxpaint.o: src/tuxpaint.c \ obj/parse.c: obj/parse_step1.c @echo @echo "...Generating the command-line and config file parser (STEP 2)..." - sed -r -e 's/^const struct/static const struct/' -e 's/_GNU/_TUX/' obj/parse_step1.c > obj/parse.c + @sed -r -e 's/^const struct/static const struct/' -e 's/_GNU/_TUX/' obj/parse_step1.c > obj/parse.c obj/parse_step1.c: src/parse.gperf @echo @echo "...Generating the command-line and config file parser (STEP 1)..." - @gperf src/parse.gperf > obj/parse_step1.c + @if [ -x /usr/bin/gperf ] ; then \ + gperf src/parse.gperf > obj/parse_step1.c ; \ + else \ + echo "Please install 'gperf' and try again!" ; \ + false ; \ + fi obj/parse.o: obj/parse.c src/parse.h src/compiler.h @echo