Commit 0936e9d8 by Hampton Catlin

move executables out of the src folder

parent c1e55438
......@@ -15,7 +15,8 @@ CPP_FILES = \
sassc: sassc_obj libsass
gcc -o $(BIN_DIR)/sassc $(BUILD_DIR)/sassc.o libsass.a -lstdc++
sassc_obj: build_dir $(SRC_DIR)/sassc.c
sassc_obj: build_dir sassc.c
gcc -c sassc.c
mv *.o $(BUILD_DIR)
libsass: libsass_objs
......
require 'mkmf'
dir_config('cdjukebox')
# .. more stuff
create_makefile("CDJukeBox")
\ No newline at end of file
......@@ -18,7 +18,7 @@
// var cssResult = sass_compile(opts, &callbackfunction);
#include <stdio.h>
#include "sass_interface.h"
#include "src/sass_interface.h"
int main(int argc, char** argv)
{
......
require 'mkmf'
# .. more stuff
$LIBPATH.push(Config::CONFIG['libdir'])
create_makefile("libsass")
\ No newline at end of file
#include <iostream>
#include <string>
#include <map>
#include "document.hpp"
#include "eval_apply.hpp"
using namespace Sass;
using namespace std;
int main(int argc, char* argv[]) {
if (argc < 2) {
cout << "Hey, I at least need a file to read!" << endl;
return 0;
}
char* path;
Document::CSS_Style style = Document::nested;
for (int i = 1; i < argc; ++i) {
if (string(argv[i]) == "--style") {
string style_name(argv[++i]);
if (style_name == "nested") style = Document::nested;
else if (style_name == "expanded") style = Document::expanded;
else if (style_name == "echo") style = Document::echo;
}
else {
path = argv[i];
}
}
Document doc(path, 0);
cerr << "INITIALIZED DOCUMENT OBJECT" << endl;
doc.parse_scss();
cerr << "PARSED DOCUMENT" << endl;
eval(doc.root, doc.context.global_env, doc.context.function_env);
cerr << "EVALUATED DOCUMENT" << endl;
string output = doc.emit_css(style);
// cerr << "Fresh nodes:\t" << Node::fresh << endl;
// cerr << "Copied nodes:\t" << Node::copied << endl;
cerr << "Allocations:\t" << Node::allocations << endl;
cout << output;
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment