-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed build script for BSD systems #1554
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ a.out | |
aclocal.m4 | ||
autom4te.cache | ||
badinput | ||
BSDmakefile | ||
commit-stamp | ||
compile | ||
config.cache | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,31 @@ set -xe | |
type autoreconf || exit 1 | ||
type pkg-config || exit 1 | ||
|
||
ctags_files=`make -f makefiles/list-translator-input.mak --no-print-directory` | ||
gen_bsdmakefile() { | ||
set +xe | ||
echo -e '.DONE:\n\t@echo "Please use GNU Make (gmake) to build this project"\n.DEFAULT:\n\t@echo "Please use GNU Make (gmake) to build this project"' > BSDmakefile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't you generate the 2 rules at once? like .DONE .DEFAULT:
@echo "Please use GNU Make (gmake) to build this project" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, would it be handy to forward the call to GNU Make automatically? If .DONE .DEFAULT:
@echo "Please use GNU Make (gmake) to build this project"
make $@ is enough it seems handy. OK, maybe it's trickier because we'd like to forward some of the |
||
set -xe | ||
} | ||
|
||
is_bsd() { | ||
UNAME=`uname` | ||
if echo $UNAME | grep -i bsd >/dev/null; then | ||
#return true | ||
return 0 | ||
else | ||
#return false | ||
return 1 | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be simplified a lot with is_bsd() {
uname | grep -i bsd >/dev/null
} |
||
} | ||
|
||
if is_bsd; then | ||
MAKE="gmake" | ||
gen_bsdmakefile | ||
else | ||
MAKE="make" | ||
fi | ||
|
||
ctags_files=`${MAKE} -f makefiles/list-translator-input.mak --no-print-directory` | ||
misc/dist-test-cases > makefiles/test-cases.mak && \ | ||
if autoreconf -vfi; then | ||
if type perl > /dev/null; then | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why changing those shell options? What is supposed to be the problem with
e
here, and why disablingx
?