Commit 51bd9815 authored by Christian Mohrbacher's avatar Christian Mohrbacher

fhgfs_general: changed Makefiles and build scripts for libcppunit

parent d8d5c6eb
......@@ -111,6 +111,8 @@ help:
@echo ' Path to the fhgfs_common directory.'
@echo ' FHGFS_OPENTK_PATH=<path>:'
@echo ' Path to the fhgfs_opentk_lib directory.'
@echo ' FHGFS_THIRDPARTY_PATH=<path>:'
@echo ' Path to the fhgfs_thirdparty directory.'
@echo ' JAVA_HOME=<path>'
@echo ' Path to Java JDK installation (optional)'
@echo ' FHGFS_SETUP_PATH=<path>'
......
......@@ -4,12 +4,15 @@
# Use "make help" to find out about configuration options.
FHGFS_OPENTK_PATH ?= ../../fhgfs_opentk_lib/
FHGFS_THIRDPARTY_PATH ?= ../../fhgfs_thirdparty/
CPPUNIT_INC_PATH ?= $(FHGFS_THIRDPARTY_PATH)/source/cppunit/include
LIB = fhgfs-common
CXX = g++
CXXFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
-I../source -I$(FHGFS_OPENTK_PATH)/include \
-I../source -I$(FHGFS_OPENTK_PATH)/include -I$(CPPUNIT_INC_PATH) \
-pthread -rdynamic -Wall -fmessage-length=0 -fno-strict-aliasing \
-Wunused-variable -Wextra -Wno-unused-parameter -ggdb3 $(USER_CXXFLAGS)
CXXFLAGS_RELEASE = -O3 -Wuninitialized
......
......@@ -21,17 +21,17 @@ void TestUnitTk::tearDown()
void TestUnitTk::testGigabyteToByte()
{
double gbValue = 1.0;
int64_t byteValueExpected = 1073741824;
int64_t byteValueExpected = 1073741824LL;
int64_t byteValueCalc = UnitTk::gigabyteToByte(gbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
gbValue = 10.0;
byteValueExpected = 10737418240;
byteValueExpected = 10737418240LL;
byteValueCalc = UnitTk::gigabyteToByte(gbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
gbValue = 10.598;
byteValueExpected = 11379515850;
byteValueExpected = 11379515850LL;
byteValueCalc = UnitTk::gigabyteToByte(gbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
......@@ -40,17 +40,17 @@ void TestUnitTk::testGigabyteToByte()
void TestUnitTk::testMegabyteToByte()
{
double mbValue = 1.0;
int64_t byteValueExpected = 1048576;
int64_t byteValueExpected = 1048576LL;
int64_t byteValueCalc = UnitTk::megabyteToByte(mbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
mbValue = 10.0;
byteValueExpected = 10485760;
byteValueExpected = 10485760LL;
byteValueCalc = UnitTk::megabyteToByte(mbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
mbValue = 10.598;
byteValueExpected = 11112808;
byteValueExpected = 11112808LL;
byteValueCalc = UnitTk::megabyteToByte(mbValue);;
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
}
......@@ -58,17 +58,17 @@ void TestUnitTk::testMegabyteToByte()
void TestUnitTk::testKilobyteToByte()
{
double kbValue = 1.0;
int64_t byteValueExpected = 1024;
int64_t byteValueExpected = 1024LL;
int64_t byteValueCalc = UnitTk::kilobyteToByte(kbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
kbValue = 10.0;
byteValueExpected = 10240;
byteValueExpected = 10240LL;
byteValueCalc = UnitTk::kilobyteToByte(kbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
kbValue = 10.598;
byteValueExpected = 10852;
byteValueExpected = 10852LL;
byteValueCalc = UnitTk::kilobyteToByte(kbValue);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
}
......@@ -76,37 +76,37 @@ void TestUnitTk::testKilobyteToByte()
void TestUnitTk::testByteToXbyte()
{
std::string unit;
int64_t value = 2048;
int64_t value = 2048LL;
double valueExpected = 2.0;
double valueCalc = UnitTk::byteToXbyte(value, &unit);
CPPUNIT_ASSERT(valueExpected == valueCalc);
CPPUNIT_ASSERT(unit.compare("KB") == 0);
value = 10240;
value = 10240LL;
valueExpected = 10.0;
valueCalc = UnitTk::byteToXbyte(value, &unit);
CPPUNIT_ASSERT(valueExpected == valueCalc);
CPPUNIT_ASSERT(unit.compare("KB") == 0);
value = 10843;
value = 10843LL;
valueExpected = 10.6;
valueCalc = UnitTk::byteToXbyte(value, &unit, true);
CPPUNIT_ASSERT(valueExpected == valueCalc);
CPPUNIT_ASSERT(unit.compare("KB") == 0);
value = 1073741824;
value = 1073741824LL;
valueExpected = 1024.0;
valueCalc = UnitTk::byteToXbyte(value, &unit);
CPPUNIT_ASSERT(valueExpected == valueCalc);
CPPUNIT_ASSERT(unit.compare("MB") == 0);
value = 10737418240;
value = 10737418240LL;
valueExpected = 10.0;
valueCalc = UnitTk::byteToXbyte(value, &unit);
CPPUNIT_ASSERT(valueExpected == valueCalc);
CPPUNIT_ASSERT(unit.compare("GB") == 0);
value = 11446087843.84;
value = 11446087843LL;
valueExpected = 10.7;
valueCalc = UnitTk::byteToXbyte(value, &unit, true);
CPPUNIT_ASSERT(valueExpected == valueCalc);
......@@ -117,51 +117,51 @@ void TestUnitTk::testXbyteToByte()
{
std::string unit = "KB";
double value = 1.0;
int64_t byteValueExpected = 1024;
int64_t byteValueExpected = 1024LL;
int64_t byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
value = 10.0;
byteValueExpected = 10240;
byteValueExpected = 10240LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
value = 10.598;
byteValueExpected = 10852;
byteValueExpected = 10852LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
unit = "MB";
value = 1.0;
byteValueExpected = 1048576;
byteValueExpected = 1048576LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
value = 10.0;
byteValueExpected = 10485760;
byteValueExpected = 10485760LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
value = 10.598;
byteValueExpected = 11112808;
byteValueExpected = 11112808LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
unit = "GB";
value = 1.0;
byteValueExpected = 1073741824;
byteValueExpected = 1073741824LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
value = 10.0;
byteValueExpected = 10737418240;
byteValueExpected = 10737418240LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
value = 10.598;
byteValueExpected = 11379515850;
byteValueExpected = 11379515850LL;
byteValueCalc = UnitTk::xbyteToByte(value, unit);
CPPUNIT_ASSERT(byteValueExpected == byteValueCalc);
}
......@@ -80,6 +80,8 @@ help:
@echo ' Path to the fhgfs_opentk_lib directory.'
@echo ' FHGFS_COMMON_PATH=<path>:'
@echo ' Path to the fhgfs_common directory.'
@echo ' FHGFS_THIRDPARTY_PATH=<path>:'
@echo ' Path to the fhgfs_thirdparty directory.'
@echo ' FHGFS_VERSION="a-version-string"'
@echo ' Version the daemon identifies itself with'
@echo
......
......@@ -21,6 +21,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
make FHGFS_VERSION='__FHGFS_VERSION__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
......
......@@ -3,6 +3,7 @@
%define buildarch %BUILDARCH%
%define FHGFS_OPENTK_PATH %FHGFS_OPENTK_PATH%
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
......@@ -66,6 +67,7 @@ cd build
make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
%define debug_package %{nil}
......
......@@ -8,6 +8,7 @@ source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
......@@ -23,6 +24,7 @@ sed \
sed \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s#__FHGFS_THIRDPARTY_PATH__#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
......
......@@ -25,12 +25,14 @@ rm -f $BUILD/buildroot/SOURCES/*.tgz
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#g" \
-e "s#%FHGFS_THIRDPARTY_PATH%#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
......
......@@ -81,6 +81,8 @@ help:
@echo ' Path to the fhgfs_opentk_lib directory.'
@echo ' FHGFS_COMMON_PATH=<path>:'
@echo ' Path to the fhgfs_common directory.'
@echo ' FHGFS_THIRDPARTY_PATH=<path>:'
@echo ' Path to the fhgfs_thirdparty directory.'
@echo ' FHGFS_VERSION="a-version-string"'
@echo ' Version the daemon identifies itself with'
@echo
......
......@@ -21,6 +21,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
make FHGFS_VERSION='__FHGFS_VERSION__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
......
......@@ -3,6 +3,7 @@
%define buildarch %BUILDARCH%
%define FHGFS_OPENTK_PATH %FHGFS_OPENTK_PATH%
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
......@@ -65,6 +66,7 @@ cd build
make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
......
......@@ -8,6 +8,7 @@ source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
......@@ -23,6 +24,7 @@ sed \
sed \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s#__FHGFS_THIRDPARTY_PATH__#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
......
......@@ -25,12 +25,14 @@ rm -f $BUILD/buildroot/SOURCES/*.tgz
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#g" \
-e "s#%FHGFS_THIRDPARTY_PATH%#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
......
......@@ -81,6 +81,8 @@ help:
@echo ' Path to the fhgfs_opentk_lib directory.'
@echo ' FHGFS_COMMON_PATH=<path>:'
@echo ' Path to the fhgfs_common directory.'
@echo ' FHGFS_THIRDPARTY_PATH=<path>:'
@echo ' Path to the fhgfs_thirdparty directory.'
@echo ' FHGFS_VERSION="a-version-string"'
@echo ' Version the daemon identifies itself with'
@echo
......
......@@ -21,6 +21,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
make FHGFS_VERSION='__FHGFS_VERSION__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
......
......@@ -3,6 +3,7 @@
%define buildarch %BUILDARCH%
%define FHGFS_OPENTK_PATH %FHGFS_OPENTK_PATH%
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
......@@ -61,6 +62,7 @@ cd build
make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
......
......@@ -8,6 +8,7 @@ source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
......@@ -23,6 +24,7 @@ sed \
sed \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s#__FHGFS_THIRDPARTY_PATH__#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
......
......@@ -25,12 +25,14 @@ rm -f $BUILD/buildroot/SOURCES/*.tgz
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#g" \
-e "s#%FHGFS_THIRDPARTY_PATH%#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
......
......@@ -80,10 +80,12 @@ help:
@echo ' Specifies a c++ compiler.'
@echo ' DISTCC=distcc:'
@echo ' Enables the usage of distcc.'
@echo ' FHGFS_COMMON_PATH:'
@echo ' FHGFS_COMMON_PATH=<path>:'
@echo ' Path to the fhgfs_common directory.'
@echo ' FHGFS_OPENTK_PATH:'
@echo ' FHGFS_OPENTK_PATH=<path>:'
@echo ' Path to the fhgfs_opentk_lib directory.'
@echo ' FHGFS_THIRDPARTY_PATH=<path>:'
@echo ' Path to the fhgfs_thirdparty directory.'
@echo ' FHGFS_VERSION="a-version-string"'
@echo ' Version the daemon identifies itself with'
@echo
......
......@@ -21,6 +21,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
make FHGFS_VERSION='__FHGFS_VERSION__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
USER_LDFLAGS='__USER_LDFLAGS__' \
-j4
......
......@@ -3,6 +3,7 @@
%define buildarch %BUILDARCH%
%define FHGFS_OPENTK_PATH %FHGFS_OPENTK_PATH%
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
......@@ -60,6 +61,7 @@ cd build
make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
-j4
......
......@@ -8,6 +8,7 @@ source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
CHANGELOG="debian/changelog"
RULES="debian/rules"
......@@ -23,6 +24,7 @@ sed \
sed \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s#__FHGFS_THIRDPARTY_PATH__#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
-e "s/__NAME__/$NAME/g" \
-e "s/__USER_CXXFLAGS__/$USER_CXXFLAGS/g" \
......
......@@ -25,6 +25,7 @@ rm -f $BUILD/buildroot/SOURCES/*.tgz
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
pushd $TOOLS_ROOT
tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=buildroot/* *
......@@ -32,6 +33,7 @@ cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#g" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#g" \
-e "s/%NAME%/$NAME/g" \
-e "s#%FHGFS_THIRDPARTY_PATH%#$FHGFS_THIRDPARTY_PATH#g" \
-e "s/%RELEASE_STR%/$RELEASE_STR/g" \
-e "s/%VER%/$VER/g" \
-e "s/%BUILDARCH%/$BUILDARCH/g" \
......
......@@ -68,6 +68,6 @@ clean_openssl:
clean_cppunit:
# Makefile is created by autools *after* 'configure', so make clean may fail
cd $(CPPUNIT_PATH); touch Makefile; make clean || true; make dclean || true
# rm -f $(CPPUNIT_LIB_IN) $(CPPUNIT_LIB_OUT)
cd $(CPPUNIT_PATH); touch Makefile; touch config/missing; make clean || true;
rm -f $(CPPUNIT_LIB_IN) $(CPPUNIT_LIB_OUT)
This diff is collapsed.
......@@ -5,6 +5,7 @@
FHGFS_COMMON_PATH ?= ../../fhgfs_common/
FHGFS_OPENTK_PATH ?= ../../fhgfs_opentk_lib/
FHGFS_THIRDPARTY_PATH ?= ../../fhgfs_thirdparty/
FHGFS_ONLINE_CFG_PATH ?= ../../fhgfs_online_cfg
FHGFS_FSCK_PATH ?= ../../fhgfs_fsck
......@@ -22,6 +23,7 @@ all: fhgfs_online_cfg fhgfs_fsck
fhgfs_online_cfg:
make FHGFS_COMMON_PATH=$(FHGFS_COMMON_PATH) \
FHGFS_OPENTK_PATH=$(FHGFS_OPENTK_PATH) \
FHGFS_THIRDPARTY_PATH=$(FHGFS_THIRDPARTY_PATH) \
$(EXTRA_FLAGS) $(FHGFS_EXTRA_FLAGS) \
-C $(FHGFS_ONLINE_CFG_PATH)/build
cp $(FHGFS_ONLINE_CFG_PATH)/build/fhgfs-online-cfg .
......@@ -29,6 +31,7 @@ fhgfs_online_cfg:
fhgfs_fsck:
make FHGFS_COMMON_PATH=$(FHGFS_COMMON_PATH) \
FHGFS_OPENTK_PATH=$(FHGFS_OPENTK_PATH) \
FHGFS_THIRDPARTY_PATH=$(FHGFS_THIRDPARTY_PATH) \
$(EXTRA_FLAGS) $(FHGFS_EXTRA_FLAGS) \
-C $(FHGFS_FSCK_PATH)/build
cp $(FHGFS_FSCK_PATH)/build/fhgfs-fsck .
......@@ -58,6 +61,8 @@ help:
@echo ' Path to the fhgfs_opentk_lib directory.'
@echo ' FHGFS_COMMON_PATH=<path>:'
@echo ' Path to the fhgfs_common directory.'
@echo ' FHGFS_THIRDPARTY_PATH=<path>:'
@echo ' Path to the fhgfs_thirdparty directory.'
@echo
@echo 'Targets:'
@echo ' all (default) - build only'
......
......@@ -21,6 +21,7 @@ build-stamp: $(QUILT_STAMPFN) configure-stamp
make FHGFS_VERSION='__FHGFS_VERSION__' \
FHGFS_COMMON_PATH='__FHGFS_COMMON_PATH__' \
FHGFS_OPENTK_PATH='__FHGFS_OPENTK_PATH__' \
FHGFS_THIRDPARTY_PATH='__FHGFS_THIRDPARTY_PATH__' \
FHGFS_ONLINE_CFG_PATH='__FHGFS_ONLINE_CFG_PATH__' \
FHGFS_FSCK_PATH='__FHGFS_FSCK_PATH__' \
USER_CXXFLAGS='__USER_CXXFLAGS__' \
......
......@@ -5,6 +5,7 @@
%define FHGFS_COMMON_PATH %FHGFS_COMMON_PATH%
%define FHGFS_ONLINE_CFG_PATH %FHGFS_ONLINE_CFG_PATH%
%define FHGFS_FSCK_PATH %FHGFS_FSCK_PATH%
%define FHGFS_THIRDPARTY_PATH %FHGFS_THIRDPARTY_PATH%
%define FHGFS_VERSION %VER%-%RELEASE_STR%
%define is_fedora %(test -e /etc/fedora-release && echo 1 || echo 0)
......@@ -63,6 +64,7 @@ The package contains FhGFS utils.
make FHGFS_OPENTK_PATH=%{FHGFS_OPENTK_PATH} \
FHGFS_COMMON_PATH=%{FHGFS_COMMON_PATH} \
FHGFS_ONLINE_CFG_PATH=%{FHGFS_ONLINE_CFG_PATH} \
FHGFS_THIRDPARTY_PATH=%{FHGFS_THIRDPARTY_PATH} \
FHGFS_FSCK_PATH=%{FHGFS_FSCK_PATH} \
FHGFS_VERSION=%{FHGFS_VERSION} \
-C build/ -j4
......
......@@ -8,6 +8,7 @@ source ../../fhgfs-version
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
FHGFS_ONLINE_CFG_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_online_cfg`}
FHGFS_FSCK_PATH=${FHGFS_FSCK_PATH:-`readlink -f ../../fhgfs_fsck`}
......@@ -25,6 +26,7 @@ sed \
sed \
-e "s#__FHGFS_COMMON_PATH__#$FHGFS_COMMON_PATH#g" \
-e "s#__FHGFS_OPENTK_PATH__#$FHGFS_OPENTK_PATH#g" \
-e "s#__FHGFS_THIRDPARTY_PATH__#$FHGFS_THIRDPARTY_PATH#g" \
-e "s#__FHGFS_ONLINE_CFG_PATH__#$FHGFS_ONLINE_CFG_PATH#g" \
-e "s#__FHGFS_FSCK_PATH__#$FHGFS_FSCK_PATH#g" \
-e "s/__FHGFS_VERSION__/$FHGFS_VERSION/g" \
......
......@@ -25,6 +25,7 @@ rm -f $BUILD/buildroot/SOURCES/*.tgz
FHGFS_OPENTK_PATH=${FHGFS_OPENTK_PATH:-`readlink -f ../../fhgfs_opentk_lib`}
FHGFS_COMMON_PATH=${FHGFS_COMMON_PATH:-`readlink -f ../../fhgfs_common`}
FHGFS_THIRDPARTY_PATH=${FHGFS_THIRDPARTY_PATH:-`readlink -f ../../fhgfs_thirdparty`}
FHGFS_ONLINE_CFG_PATH=${FHGFS_ONLINE_CFG_PATH:-`readlink -f ../../fhgfs_online_cfg`}
FHGFS_FSCK_PATH=${FHGFS_FSCK_PATH:-`readlink -f ../../fhgfs_fsck`}
......@@ -34,6 +35,7 @@ tar czf $BUILD/buildroot/SOURCES/${NAME}-${VER}-$RELEASE_STR.tgz --exclude=bui
cd $BUILD
sed -e "s#%FHGFS_OPENTK_PATH%#$FHGFS_OPENTK_PATH#" \
-e "s#%FHGFS_COMMON_PATH%#$FHGFS_COMMON_PATH#" \
-e "s#%FHGFS_THIRDPARTY_PATH%#$FHGFS_THIRDPARTY_PATH#" \
-e "s#%FHGFS_ONLINE_CFG_PATH%#$FHGFS_ONLINE_CFG_PATH#" \
-e "s#%FHGFS_FSCK_PATH%#$FHGFS_FSCK_PATH#" \
-e "s/%NAME%/$NAME/" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment