Fix nawk GNUmakefile to run MAKETAB with WINE in --mingw
Also add V= for --verbose
Change-Id: I8024410cc7969eec64a9efb25c4a27d1698c9ad7
diff --git a/build/tools/build-host-awk.sh b/build/tools/build-host-awk.sh
index 84890b7..b0c0957 100755
--- a/build/tools/build-host-awk.sh
+++ b/build/tools/build-host-awk.sh
@@ -61,6 +61,10 @@
if [ "$TRY64" = "yes" ]; then
BUILD_TRY64=yes
fi
+V=0
+if [ "$VERBOSE2" = "yes" ]; then
+ V=1
+fi
log "Configuring the build"
mkdir -p $BUILD_DIR && rm -rf $BUILD_DIR/*
@@ -73,7 +77,8 @@
-j $NUM_JOBS \
BUILD_DIR="$BUILD_DIR" \
MINGW="$BUILD_MINGW" \
- TRY64="$BUILD_TRY64"
+ TRY64="$BUILD_TRY64" \
+ V="$V"
fail_panic "Failed to build the awk-$AWK_VERSION executable!"
log "Copying executable to prebuilt location"
diff --git a/sources/host-tools/nawk-20071023/GNUmakefile b/sources/host-tools/nawk-20071023/GNUmakefile
index 8c976aa..631227f 100644
--- a/sources/host-tools/nawk-20071023/GNUmakefile
+++ b/sources/host-tools/nawk-20071023/GNUmakefile
@@ -37,6 +37,8 @@
CC := i586-pc-mingw32msvc-gcc
endif
EXE := .exe
+else
+WINE :=
endif
PROGRAM := $(BUILD_DIR)/ndk-awk$(EXE)
@@ -82,7 +84,7 @@
$(PROCTAB_C): $(MAKETAB) $(YTAB_H)
@echo "Gen: $(notdir $@)"
- $(hide)$(MAKETAB) $(YTAB_H) > $@
+ $(hide)$(WINE) $(MAKETAB) $(YTAB_H) > $@
$(PROGRAM): $(OBJECTS)