diff --git a/build_lofar.sh b/build_lofar.sh
index 45e120bdace16fbcf7f2688c2ebc9dbe9be7e0e5..5b61cdce453970a954236d83c683c97b3fb15fff 100644
--- a/build_lofar.sh
+++ b/build_lofar.sh
@@ -10,7 +10,6 @@
 #   fetch/patch/build code
 
 mandatory_vars="\
-lofar_prefix      Installation prefix to use. Packages are put into sub-directories of that.
 casacore_version  Version of CASAcore.
 pycasa_version    Version of CASAcore Python bindings.
 dysco_version     Version of Dysco.
@@ -35,7 +34,17 @@ CPATH        Path list for C/C++ include file search.
 idg_mkl      Passed on to idg BUILD_WITH_MKL
 "
 
-config=$0.config
+if test $# -lt 1; then
+  echo "$0: Please provide the installation prefix as mandatory argument."
+  exit 1
+fi
+lofar_prefix=$1; shift
+
+if test $# -ge 1; then
+  config=$1; shift
+else
+  config=$0.config
+fi
 
 if ! test -e "$config"; then
   cat <<EOT
@@ -46,7 +55,8 @@ Please create/link an appropriate config script named
 
   $config
 
-. It should load the correct environment for the site, possibly
+(or any other name you provide as second argument).
+It should load the correct environment for the site, possibly
 using environment modules or just setting variables for paths
 and compilers directly. It also has to set up PATH so that the
 desired python interpreter is directly available as the command
@@ -676,6 +686,9 @@ print_init()
 #
 # Step 1: The build config with all variables used.
 #
+
+lofar_prefix='$lofar_prefix'
+
 EOT
   cat $config
 cat <<EOT
diff --git a/build_lofar.sh.config.rrz b/build_lofar.sh.config.rrz
index 06c92ce091f8adbe3cea546e908c12478b6e5a9b..61fecbfea0d611d6ac88e7ee418099410212f12a 100644
--- a/build_lofar.sh.config.rrz
+++ b/build_lofar.sh.config.rrz
@@ -1,6 +1,5 @@
 # The setup on the Hamburg LOFAR GPU Cluster.
 
-lofar_prefix=$1 # Give installation directory as first argument.
 aoflagger_version=2.14.0
 casacore_version=latest
 dysco_version=1.2.0