|
4 years ago | |
---|---|---|
.. | ||
.gitignore | 4 years ago | |
Makefile | 4 years ago | |
README.md | 4 years ago | |
hello.vala | 4 years ago |
If you want to build a vala file, you may have to run a command with many parameters. Why remember this to build it? Just create a makefile with the commands and forget them!
If you have make
installed, you can just cd into the directory and run make
and it will run the commands in the Makefile
that you have. The syntax for Makefile is easy. Just type in a task name, followed by a colon (:
) and then on the following line type what you want to execute. This can be build command or any other command that you like. The first one runs when you run make
without any task name.
firsttask:
# some commands here
# this will run when you just run `make` without any params
another_task:
# some more commands
# they can span multiple lines
# this will run when you run `make another_task`
Simple, isn't it?
# Void Linux
sudo xbps-install vala make gcc
# Arch Linux
sudo pacman -S vala make gcc
$ make
$ ./hello # or make run
To compile and run:
$ make makeandrun