Project

General

Profile

Actions

Bug #185

closed

gen-compat-autoconf.sh generates broken compat-autoconf.h header

Added by Anonymous almost 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/06/2014
Due date:
% Done:

0%

Estimated time:

Description

Running gen-compat-autoconf.sh generates a broken header file ("compat-autoconf.h"), because the first line contains the invalid characters -n. This causes the build to fail with following error:

compat-autoconf.h:1:1: error: expected identifier or '(' before '-' token

This error is possibly caused by line 8 in the gen-compat-autoconf.sh script. This line does not invoke echo with the -n parameter, instead it outputs -n literally which is then included in the header file and causing the error.

Quote from Stack Overflow (https://stackoverflow.com/questions/13258664/echo-n-will-not-print-n/13258861#13258861):

If you invoke Bash with the name sh, it will mimic sh, where the -n option was not available to echo. (…)

Possible fix:
I think line 8 is redundant, because line 39 would create the file anyway. If you want an alternative (to be sure) I'd suggest to replace line 8 by 'touch "${TMP}"'.

Infos:
System: Mac OS 10.9.2
Bash: GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Batman: batman-adv-legacy-2014-01-24-e51bd5682e51e6afd8c914686ed675161a75b2d2 from https://github.com/freifunk-gluon/batman-adv-legacy


Files

gen-compat-autoconf.sh-POSIX-compliance.patch (270 Bytes) gen-compat-autoconf.sh-POSIX-compliance.patch Copy patch to root folder and execute with patch -p0 <gen-compat-autoconf.sh-POSIX-compliance.patch Anonymous, 05/07/2014 11:47 AM
Actions

Also available in: Atom PDF