Skip to content

Commit

Permalink
qb: Init some variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbea committed Feb 8, 2019
1 parent 8936972 commit fe28192
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
6 changes: 4 additions & 2 deletions qb/config.libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ add_define MAKEFILE NOUNUSED_VARIABLE "$HAVE_NOUNUSED_VARIABLE"

[ -z "$CROSS_COMPILE" ] && [ -d /opt/local/lib ] && add_dirs LIBRARY /opt/local/lib

[ "$GLOBAL_CONFIG_DIR" ] || \
[ "${GLOBAL_CONFIG_DIR:-}" ] ||
{ case "$PREFIX" in
/usr*) GLOBAL_CONFIG_DIR=/etc ;;
*) GLOBAL_CONFIG_DIR="$PREFIX"/etc ;;
esac
}

DYLIB=-ldl;
DYLIB=-ldl
CLIB=-lc
PTHREADLIB=-lpthread
SOCKETLIB=-lc
SOCKETHEADER=
INCLUDES='usr/include usr/local/include'
SORT='sort'
EXTRA_GL_LIBS=''
VC_PREFIX=''

if [ "$OS" = 'BSD' ]; then
[ -d /usr/local/include ] && add_dirs INCLUDE /usr/local/include
Expand Down
5 changes: 5 additions & 0 deletions qb/qb.comp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ TEMP_C=.tmp.c
TEMP_CXX=.tmp.cxx
TEMP_EXE=.tmp

CC="${CC:-}"
CXX="${CXX:-}"
PKG_CONF_PATH="${PKG_CONF_PATH:-}"
WINDRES="${WINDRES:-}"

# Checking for working C compiler
cat << EOF > "$TEMP_C"
#include <stdio.h>
Expand Down
9 changes: 8 additions & 1 deletion qb/qb.libs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
MAKEFILE_DEFINES=''
CONFIG_DEFINES=''
INCLUDE_DIRS=''
LIBRARY_DIRS=''
MAKEFILE_DEFINES=''
PKG_CONF_USED=''

ASFLAGS="${ASFLAGS:-}"
CFLAGS="${CFLAGS:-}"
CXXFLAGS="${CXXFLAGS:-}"
LDFLAGS="${LDFLAGS:-}"
PREFIX="${PREFIX:-/usr/local}"
SHARE_DIR="${SHARE_DIR:-${PREFIX}/share}"

Expand Down
1 change: 1 addition & 0 deletions qb/qb.make.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Creates config.mk and config.h.
vars=''
add_define MAKEFILE GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR"
set -- $(set | grep ^HAVE_)
while [ $# -gt 0 ]; do
Expand Down
2 changes: 2 additions & 0 deletions qb/qb.moc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
TEMP_MOC=.moc.h
TEMP_CPP=.moc.cpp

MOC="${MOC:-}"

# Checking for working moc
cat << EOF > "$TEMP_MOC"
#include <QTimeZone>
Expand Down
4 changes: 3 additions & 1 deletion qb/qb.params.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ opt_exists() # $opt is returned if exists in OPTS
}

parse_input() # Parse stuff :V
{ OPTS=; while read -r VAR _; do
{ BUILD=''
OPTS=''
while read -r VAR _; do
TMPVAR="${VAR%=*}"
OPTS="$OPTS ${TMPVAR##HAVE_}"
done < 'qb/config.params.sh'
Expand Down
2 changes: 1 addition & 1 deletion qb/qb.system.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if [ -n "$CROSS_COMPILE" ]; then
if [ -n "${CROSS_COMPILE:=}" ]; then
case "$CROSS_COMPILE" in
*'-mingw32'*) OS='Win32';;
*'-msdosdjgpp'*) OS='DOS';;
Expand Down

0 comments on commit fe28192

Please sign in to comment.