From 04e2235ce7f9439b32b811329763f9aa60ee89a4 Mon Sep 17 00:00:00 2001
From: Gregory Jordan <gjuggler@gmail.com>
Date: Sat, 28 Dec 2013 22:33:29 -0500
Subject: [PATCH] Fix singlefile build target

---
 make.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/make.js b/make.js
index bcc22f978..f20ec6601 100644
--- a/make.js
+++ b/make.js
@@ -317,6 +317,10 @@ target.bundle = function(args) {
     // We want shared_src_files in both pdf.js and pdf.worker.js
     // unless it's being built in singlefile mode.
     WORKER_SRC_FILES = SHARED_SRC_FILES.concat(WORKER_SRC_FILES);
+  } else {
+    // In singlefile mode, all of the src files will be bundled into
+    // the main pdf.js outuput.
+    MAIN_SRC_FILES = MAIN_SRC_FILES.concat(WORKER_SRC_FILES);
   }
 
   var EXT_SRC_FILES = [
@@ -367,9 +371,8 @@ target.singlefile = function() {
   cd(SINGLE_FILE_DIR);
 
   echo();
-  echo('### Concatenating pdf.js and pdf.worker.js into pdf.combined.js');
+  echo('### Moving pdf.js to pdf.combined.js');
   var pdfJs = cat(BUILD_TARGET);
-  pdfJs += cat(BUILD_WORKER_TARGET);
   pdfJs.to(SINGLE_FILE_TARGET);
 
   rm(BUILD_TARGET);