Last active
November 24, 2015 04:54
-
-
Save ryosuke-endo/0b0eb1573ca71c885fc7 to your computer and use it in GitHub Desktop.
forcing make hello
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char *args[]) | |
{ | |
printf("Hello, world!\n"); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake/clean' | |
CLOBBER.include('hello') | |
SRC_DISTDIR = './helloworld' | |
directory SRC_DISTDIR | |
CC = 'gcc' | |
str = <<EOS | |
#{CC} -o hello hello.c | |
./hello | |
EOS | |
desc 'compile C langueage' | |
task 'default' => 'hello' | |
task 'hello' => 'hello.c' do | |
sh str | |
end | |
desc 'Create hello world in your directory' | |
task 'make_hello_package' => [SRC_DISTDIR, 'hello.c'] do | |
cp ['hello.c'], SRC_DISTDIR | |
cd SRC_DISTDIR | |
sh str | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment