summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-01-07 08:17:56 +0000
committertron <tron@openttd.org>2007-01-07 08:17:56 +0000
commitd76ed433f7b00774a73b4b6a6f9549ae974bdaa9 (patch)
tree8cb54a388da18f796a982e09a670853a019a65f4
parent7156749043dce28f8eaf636f8a358d6712ae3792 (diff)
downloadopenttd-d76ed433f7b00774a73b4b6a6f9549ae974bdaa9.tar.xz
(svn r7939) Fix useless use of cat
-rw-r--r--config.lib8
-rwxr-xr-xconfigure2
2 files changed, 5 insertions, 5 deletions
diff --git a/config.lib b/config.lib
index 85c252b60..692c36f79 100644
--- a/config.lib
+++ b/config.lib
@@ -1176,7 +1176,7 @@ check_makedepend() {
log 2 " returned `cat makedepend.tmp`"
log 2 " exit code $ret"
- if [ -z "`cat makedepend.tmp`" ]
+ if [ ! -s makedepend.tmp ]
then
rm -f makedepend.tmp makedepend.tmp.bak
@@ -1819,7 +1819,7 @@ generate_main() {
# Create the main Makefile
echo "Generating Makefile..."
- cat $ROOT_DIR/Makefile.in | sed "$SRC_REPLACE" > Makefile
+ < $ROOT_DIR/Makefile.in sed "$SRC_REPLACE" > Makefile
echo "# Auto-generated file -- DO NOT EDIT" > Makefile.am
echo "" > Makefile.am
# Make the copy of the source-list, so we don't trigger an unwanted recompile
@@ -1837,7 +1837,7 @@ generate_lang() {
mkdir -p $LANG_OBJS_DIR
echo "Generating lang/Makefile..."
- cat $ROOT_DIR/Makefile.lang.in | sed "$SRC_REPLACE" > $LANG_OBJS_DIR/Makefile
+ < $ROOT_DIR/Makefile.lang.in sed "$SRC_REPLACE" > $LANG_OBJS_DIR/Makefile
echo "DIRS += $LANG_OBJS_DIR" >> Makefile.am
echo "LANG_DIRS += $LANG_OBJS_DIR" >> Makefile.am
}
@@ -1851,7 +1851,7 @@ generate_src_normal() {
mkdir -p $SRC_OBJS_DIR
echo "Generating $2/Makefile..."
- cat $ROOT_DIR/Makefile.src.in | sed "$SRC_REPLACE" > $SRC_OBJS_DIR/Makefile
+ < $ROOT_DIR/Makefile.src.in sed "$SRC_REPLACE" > $SRC_OBJS_DIR/Makefile
echo "DIRS += $SRC_OBJS_DIR" >> Makefile.am
echo "SRC_DIRS += $SRC_OBJS_DIR" >> Makefile.am
}
diff --git a/configure b/configure
index 7800fe550..e7cfe9534 100755
--- a/configure
+++ b/configure
@@ -62,7 +62,7 @@ then
fi
# Read the source.list and process it
-SRCS="`cat $ROOT_DIR/source.list | tr '\r' '\n' | awk '
+SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | awk '
{ }
/^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; }
/^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; }