lib/tea-macro/tea-macro.js
function makeFromFile(makefile,target){
	var read;
	var basedir='.';
	if(makefile){
		read = fs.createReadStream(makefile, {encoding: 'utf8'});
		basedir=mpath.dirname(makefile);
	}else{
		process.stdin.resume();
		process.stdin.setEncoding('utf8');
		read = process.stdin;
	}
	read.on('data', function (data){
		try {
			var o=JSON.parse(data);
			make(basedir, o, target);
		}catch(e){
			console.log(e);
		}
	});
}
function makeFromFile(makefile,target){
	var read;
	var basedir='.';
	if(makefile){
		read = fs.createReadStream(makefile, {encoding: 'utf8'});
		basedir=mpath.dirname(makefile);
	}else{
		process.stdin.resume();
		process.stdin.setEncoding('utf8');
		read = process.stdin;
	}
	read.on('data', function (data){
		try {
			var o=JSON.parse(data);
			make(basedir, o, target);
		}catch(e){
			console.log(e);
		}
	});
}
function makeFromFile ( makefile , target ) { var read ; var basedir = '.' ; if ( makefile ) { read = fs . createReadStream ( makefile , { encoding : 'utf8' } ) ; basedir = mpath . dirname ( makefile ) ; } else { process . stdin . resume ( ) ; process . stdin . setEncoding ( 'utf8' ) ; read = process . stdin ; } read . on ( 'data' , function ( data ) { try { var o = JSON . parse ( data ) ; make ( basedir , o , target ) ; } catch ( e ) { console . log ( e ) ; } } ) ; }
make from file
@param makefile  path of make file
@param target    make target. if null, all targets are compiled.
make from file