From 62c3ef2684d25bdee3e81cddf02618b42d7355d8 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sun, 27 May 2012 17:37:25 -0400 Subject: [PATCH] build: Create ocarina.bin as a symlink to ocarina-player I want to add in more ocarina-* commands, so the first step is making the player its own command. Signed-off-by: Bryan Schumaker --- .gitignore | 3 +-- Sconstruct | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 70481c40..86d2e7d3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,5 @@ *.swp *.tar.gz .sconsign.dblite -ocarina.bin +bin/ include/version.h -test_* diff --git a/Sconstruct b/Sconstruct index c7b4576d..75478a4f 100644 --- a/Sconstruct +++ b/Sconstruct @@ -35,9 +35,14 @@ def directory(dirs): objs.append(files) return objs +def symlink(target, source, env): + import os + os.symlink(str(source[0]), str(target[0])) + SConscript(['include/Sconscript']) -ocarina=env.Program('ocarina.bin', directory(["libsaria", "ocarina"])) -Default([ocarina]) +ocarina = env.Program('bin/ocarina-player', directory(["libsaria", "ocarina"])) +oc_link = env.Command("ocarina.bin", "bin/ocarina-player", symlink) +Default([ocarina, oc_link]) # Install Ocarina scripts = os.listdir("scripts/")