-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUILD: do not test grep -o on non-Linux #396
configure tests for working `grep` utility for building, however it seems some systems (it seems NetBSD in particular) have problems with the `-o` switch combined with others. As the `-o` is only used for real at Linux hosts, let's not test `-o` if the build system is not Linux. Reported by @Rhialto
- Loading branch information
Showing
2 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
all: | ||
@if [ "$(ARCH)" = "" ]; then echo "You must invoke make with ARCH set." ; exit 1 ; fi | ||
bash ./configure --arch=$(ARCH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
## This file is part of the Xemu project: https://github.com/lgblgblgb/xemu | ||
## Collection of various emulators of some 8 bits machines using SDL2 library. | ||
## | ||
## Copyright (C)2016-2023 LGB (Gábor Lénárt) <[email protected]> | ||
## Copyright (C)2016-2024 LGB (Gábor Lénárt) <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -30,12 +30,27 @@ export LANG LC_TIME | |
|
||
echo -n "Testing needed UNIX tools for the build: " | ||
|
||
echo -n "grep " | ||
if [ "`echo 'alma,korte,banan' | grep -oEia ',K[^,]+,'`" != ",korte," ]; then | ||
echo -n "uname " | ||
if [ "`uname -a`" = "" ]; then | ||
echo | ||
echo "FATAL: UNIX utility 'grep' does not seem to work or cannot be found" >&2 | ||
echo "FATAL: UNIX utility 'uname' does not seem to work or cannot be found" >&2 | ||
exit 1 | ||
fi | ||
if [ "`uname`" != "Linux" ]; then | ||
echo -n "grep[-Eia] " | ||
if [ "`echo 'alma,korte,banan' | grep -Eia ',K[^,]+,'`" != "alma,korte,banan" ]; then | ||
echo | ||
echo "FATAL: UNIX utility 'grep' does not seem to work (grep -Eia) or cannot be found" >&2 | ||
exit 1 | ||
fi | ||
else | ||
echo -n "grep[-oEia] " | ||
if [ "`echo 'alma,korte,banan' | grep -oEia ',K[^,]+,'`" != ",korte," ]; then | ||
echo | ||
echo "FATAL: UNIX utility 'grep' does not seem to work (grep -oEia) or cannot be found" >&2 | ||
exit 1 | ||
fi | ||
fi | ||
echo -n "sed " | ||
if [ "`echo "testSTRSTRing" | sed -nE 's/(STR)/_\1/gp'`" != "test_STR_STRing" ]; then | ||
echo | ||
|
@@ -71,12 +86,6 @@ if [ "`pwd`" = "" ]; then | |
echo "FATAL: UNIX utility 'pwd' does not seem to work or cannot be found" >&2 | ||
exit 1 | ||
fi | ||
echo -n "uname " | ||
if [ "`uname -a`" = "" ]; then | ||
echo | ||
echo "FATAL: UNIX utility 'uname' does not seem to work or cannot be found" >&2 | ||
exit 1 | ||
fi | ||
echo -n "date " | ||
if [ "`date`" = "" ]; then | ||
echo | ||
|