diff --git a/build/unix/compiledata.sh b/build/unix/compiledata.sh
index 1dc71e7e7eb7d73d55ae4f57803babc4e1e4c4c5..fd8616d827598234b685417f7f4af00b7a31096b 100755
--- a/build/unix/compiledata.sh
+++ b/build/unix/compiledata.sh
@@ -14,9 +14,12 @@ LDFLAGS=$6
 SOEXT=$7
 SYSLIBS=$8
 LIBDIR=$9
-ROOTLIBS=${10}
-RINTLIBS=${11}
-INCDIR=${12}
+shift
+ROOTLIBS=$9
+shift
+RINTLIBS=$9
+shift
+INCDIR=$9
 
 if [ "$INCDIR" = "$ROOTSYS/include" ]; then
    INCDIR=\$ROOTSYS/include