shithub: openh264

Download patch

ref: 9a82445aef9538456cb4d7650624fad6994374cc
parent: 49a627dc5c14d3ac2446036bc6e3d8b661197ac6
parent: 253c2c84b388fcf7b0c6c9c468051099eddae586
author: Ethan Hugg <ethanhugg@gmail.com>
date: Fri Jan 24 04:35:04 EST 2014

Merge pull request #209 from mstorsjo/chdir-within-mktargets

Do chdir within mktargets.py

--- a/build/mktargets.py
+++ b/build/mktargets.py
@@ -69,8 +69,17 @@
     INCLUDE = args.include
 if args.out is not None:
     OUTFILE = args.out
+else:
+    OUTFILE = os.path.join(args.directory, OUTFILE)
 if args.cpp_suffix is not None:
     CPP_SUFFIX = args.cpp_suffix
+
+OUTFILE = os.path.abspath(OUTFILE)
+try:
+    os.chdir(args.directory)
+except:
+    sys.exit(1)
+
 (cpp, asm) = find_sources()
 
 
--- a/build/mktargets.sh
+++ b/build/mktargets.sh
@@ -1,10 +1,10 @@
 #!/bin/sh
-(cd codec/decoder && python ../../build/mktargets.py --directory codec/decoder --library decoder --exclude StdAfx.cpp)
-(cd codec/encoder && python ../../build/mktargets.py --directory codec/encoder --library encoder --exclude DllEntry.cpp)
-(cd codec/common && python ../../build/mktargets.py --directory codec/common --library common)
-(cd codec/processing && python ../../build/mktargets.py --directory codec/processing --library processing)
+python build/mktargets.py --directory codec/decoder --library decoder --exclude StdAfx.cpp
+python build/mktargets.py --directory codec/encoder --library encoder --exclude DllEntry.cpp
+python build/mktargets.py --directory codec/common --library common
+python build/mktargets.py --directory codec/processing --library processing
 
-(cd codec/console/dec && python ../../../build/mktargets.py --directory codec/console/dec --binary h264dec)
-(cd codec/console/enc && python ../../../build/mktargets.py --directory codec/console/enc --binary h264enc)
-(cd test && python ../build/mktargets.py --directory test --binary codec_unittest)
-(cd gtest && python ../build/mktargets.py --directory gtest --library gtest --out ../build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc)
+python build/mktargets.py --directory codec/console/dec --binary h264dec
+python build/mktargets.py --directory codec/console/enc --binary h264enc
+python build/mktargets.py --directory test --binary codec_unittest
+python build/mktargets.py --directory gtest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc