aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2010-10-16 21:51:25 -0700
committerMatei Zaharia <matei@eecs.berkeley.edu>2010-10-16 21:51:25 -0700
commite5fb280ec82072fdd3373136a41f96c9536a1592 (patch)
tree5649dec7c04607212c76232719bde9ca680391f1
parent023ed194b465b1ada80be1ef0deea0da99ce109e (diff)
downloadspark-e5fb280ec82072fdd3373136a41f96c9536a1592.tar.gz
spark-e5fb280ec82072fdd3373136a41f96c9536a1592.tar.bz2
spark-e5fb280ec82072fdd3373136a41f96c9536a1592.zip
Changed the config files that were included in git to templates which
are used to create an initial copy of each config file if the user does not have one. This way, users won't accidentally commit their changes to config files to git.
-rw-r--r--Makefile13
-rw-r--r--conf/java-opts.template (renamed from conf/java-opts)0
-rw-r--r--conf/log4j.properties.template (renamed from conf/log4j.properties)0
-rwxr-xr-xconf/spark-env.sh.template (renamed from conf/spark-env.sh)0
4 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index febf47f3f4..0486e443a8 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,9 @@ else
COMPILER = $(SCALA_HOME)/bin/$(COMPILER_NAME)
endif
-all: scala java
+CONF_FILES = conf/spark-env.sh conf/log4j.properties conf/java-opts
+
+all: scala java conf-files
build/classes:
mkdir -p build/classes
@@ -50,7 +52,7 @@ native: java
jar: build/spark.jar build/spark-dep.jar
-depjar: build/spark-dep.jar
+dep-jar: build/spark-dep.jar
build/spark.jar: scala java
jar cf build/spark.jar -C build/classes spark
@@ -60,6 +62,11 @@ build/spark-dep.jar:
cd build/dep && for i in $(JARS); do jar xf ../../$$i; done
jar cf build/spark-dep.jar -C build/dep .
+conf-files: $(CONF_FILES)
+
+$(CONF_FILES): %: %.template
+ if [ ! -e $@ ] ; then cp $^ $@; else touch $^; fi
+
test: all
./alltests
@@ -69,4 +76,4 @@ clean:
$(MAKE) -C src/native clean
rm -rf build
-.phony: default all clean scala java native jar depjar
+.phony: default all clean scala java native jar dep-jar conf-files
diff --git a/conf/java-opts b/conf/java-opts.template
index e69de29bb2..e69de29bb2 100644
--- a/conf/java-opts
+++ b/conf/java-opts.template
diff --git a/conf/log4j.properties b/conf/log4j.properties.template
index d72dbadc39..d72dbadc39 100644
--- a/conf/log4j.properties
+++ b/conf/log4j.properties.template
diff --git a/conf/spark-env.sh b/conf/spark-env.sh.template
index 6852b23a34..6852b23a34 100755
--- a/conf/spark-env.sh
+++ b/conf/spark-env.sh.template