Permalink
Browse files

Modifying Makefiles to not call scripts with shebangs directly.

  • Loading branch information...
Aditya Acharya
Aditya Acharya committed Aug 23, 2011
1 parent e50227e commit 9c0148e942dab195401a90e44862b92e0c84457b
Showing with 14 additions and 6 deletions.
  1. +3 −3 Makefile
  2. +9 −1 Makefile.vars
  3. +2 −2 desktop/Makefile
View
@@ -276,12 +276,12 @@ java-test:
mvn -f desktop/libs/hadoop/java/pom.xml test
test: java-test
- DESKTOP_DEBUG=1 $(BLD_DIR_BIN)/hue test fast --with-xunit
+ DESKTOP_DEBUG=1 $(ENV_PYTHON) $(BLD_DIR_BIN)/hue test fast --with-xunit
test-slow: java-test
- DESKTOP_DEBUG=1 $(BLD_DIR_BIN)/hue test all --with-xunit --with-cover
+ DESKTOP_DEBUG=1 $(ENV_PYTHON) $(BLD_DIR_BIN)/hue test all --with-xunit --with-cover
$(BLD_DIR_BIN)/coverage xml
start-dev:
- DESKTOP_DEBUG=1 $(BLD_DIR_BIN)/hue runserver_plus
+ DESKTOP_DEBUG=1 $(ENV_PYTHON) $(BLD_DIR_BIN)/hue runserver_plus
# END DEV ONLY >>>>
View
@@ -58,7 +58,6 @@ HADOOP_HOME ?= /usr/lib/hadoop
BLD_DIR := $(ROOT)/build
BLD_DIR_ENV := $(BLD_DIR)/env
BLD_DIR_BIN := $(BLD_DIR_ENV)/bin
-ENV_EASY_INSTALL := $(BLD_DIR_BIN)/easy_install
THIRDPARTY_DIR := $(ROOT)/ext/thirdparty
THIRDPARTY_JS_DIR := $(THIRDPARTY_DIR)/js
@@ -71,6 +70,15 @@ ASPECTJ_DIR := $(THIRDPARTY_DIR)/java/aspectj-1.6.5/
ENV_PYTHON := $(BLD_DIR_ENV)/bin/$(notdir $(SYS_PYTHON))
ENV_PYTHON_VERSION = $(shell $(ENV_PYTHON) -c 'import sys; print "python%d.%d"% sys.version_info[:2]')
+
+##############################
+# ENV_EASY_INSTALL uses the easy_install script installed in the virtual
+# environment. It must be called as an argument to ENV_PYTHON so the
+# problem of the shebang being truncated at 80 characters in most kernels
+# doesn't arise.
+##############################
+ENV_EASY_INSTALL := $(ENV_PYTHON) $(BLD_DIR_BIN)/easy_install
+
##############################
# This version is substituted through to the tarballs and packages.
##############################
View
@@ -84,8 +84,8 @@ $(DESKTOP_DB): $(BLD_DIR_BIN)/hue
rm -f $@ ; \
fi
@echo "--- Syncing/updating database at $@"
- @$(BLD_DIR_BIN)/hue syncdb --noinput
- @$(BLD_DIR_BIN)/hue migrate
+ @$(ENV_PYTHON) $(BLD_DIR_BIN)/hue syncdb --noinput
+ @$(ENV_PYTHON) $(BLD_DIR_BIN)/hue migrate
# Targets that simply recurse into all of the applications
ENV_INSTALL_TARGETS := $(APPS:%=.recursive-env-install/%)

0 comments on commit 9c0148e

Please sign in to comment.