From 790b07c8e30e5644e77a145a6c95cb7fffe11fd9 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 17 Aug 2010 01:10:09 -0400 Subject: [PATCH] Working build file! --- build.py | 8 +++++--- src/main.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index f25edcd..a2c4059 100755 --- a/build.py +++ b/build.py @@ -3,7 +3,7 @@ import os import subprocess import sys -ROOT = '.' +ROOT = os.path.dirname(os.path.realpath(__file__)) SRC_PATH = os.path.join(ROOT, 'src') PROD_PATH = os.path.join(ROOT, 'out') @@ -23,17 +23,19 @@ def _ObjFileName(gofile): def Main(): print '=== Starting Build ===' + os.chdir(PROD_PATH) + # Compile. for gofile in SOURCES: gofile = os.path.join(SRC_PATH, gofile) - args = [ COMPILER, '-I', PROD_PATH, '-I', SRC_PATH, '-o', _ObjFileName(gofile), gofile ] + args = [ COMPILER, gofile ] print ' ' + ' '.join(args) handle = subprocess.Popen(args, stdout = sys.stdout, stderr = sys.stderr) handle.wait() # Link objects = map(_ObjFileName, SOURCES) - args = [ LINKER, '-o', os.path.join(PROD_PATH, PRODUCT_NAME) ] + objects + args = [ LINKER, '-o', os.path.join(PROD_PATH, PRODUCT_NAME), 'main.8' ] print ' ' + ' ' .join(args) handle = subprocess.Popen(args, stdout = sys.stdout, stderr = sys.stderr) handle.wait() diff --git a/src/main.go b/src/main.go index a3ef99b..215c396 100644 --- a/src/main.go +++ b/src/main.go @@ -7,7 +7,7 @@ import ( ) func main() { - fmt.Print("Hello world") + fmt.Print("Hello world\n") server.RunFrontEnd() } -- 2.43.5