From e96ed4b46ab1376217ef148412cd814eab6cb6e4 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 15 Dec 2014 16:47:12 -0600 Subject: [PATCH] Update the makefile for building on modern *nix systems. Rename to "Makefile" so we can build with just "make." Also remove an unused variable that clang was warning about. --- Makefile.gmake => Makefile | 5 ++--- build.gcc | 4 ---- libbb/xfunc.die.c | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) rename Makefile.gmake => Makefile (92%) delete mode 100755 build.gcc diff --git a/Makefile.gmake b/Makefile similarity index 92% rename from Makefile.gmake rename to Makefile index 959f3c670..87242b718 100644 --- a/Makefile.gmake +++ b/Makefile @@ -60,9 +60,8 @@ INCLUDES = -I include -I shell -I libbb DEFINES = -Dhush_main=main -DNDEBUG LIBS = -ltermcap -OCC_FLAGS = -i -w -a0 -# Add $(OCC_FLAGS) to CFLAGS on dmake -CFLAGS = $(null, $(OCC_FLAGS)) +# CFLAGS suitable for clang or GCC +CFLAGS = -std=c89 -funsigned-char -Wall -Wno-comment -Wno-format-security PROG = hush diff --git a/build.gcc b/build.gcc deleted file mode 100755 index 312038941..000000000 --- a/build.gcc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Make with appropriate flags for gcc or clang on modern *nix systems -make -f Makefile.gmake CFLAGS="-std=c89 -funsigned-char -Wall -Wno-format-security -Wno-comment" diff --git a/libbb/xfunc.die.c b/libbb/xfunc.die.c index 83540c260..ab41c03f3 100644 --- a/libbb/xfunc.die.c +++ b/libbb/xfunc.die.c @@ -19,8 +19,6 @@ jmp_buf die_jmp; void FAST_FUNC xfunc_die(void) { - int forked; - if (die_sleep) { if ((ENABLE_FEATURE_PREFER_APPLETS || ENABLE_HUSH) && die_sleep < 0