Here is described how to proceed, to create and compile a project based on the siliconBrain make environment.
First thing you have to do is to create a directory, which will contain the complete sources and results of generated and compiled files for your package. The directory name automatically is your package name. So to start a new siliconBrain project “myProject” do a:
cd directoryWhereYourProjectsdirShouldBeCreated
mkdir myProject
cd myProject
To use siliconBrain it must be active in your environment. To that you have to execute:
export siliconBrainPath=dirWhereSiliconBrainIsInstalled
. $siliconBrainPath/setEnvironment
dirWhereSiliconBrainIsInstalled is where you installed siliconBrain. These two lines are also outputted after you have called siliconBrainInstall while being inside the siliconBrain distribution.
You can put this lines into your .bash_profile or in /etc/profile, if it should be available for all users on your system. You can also create a special xterm script, in which the environment is set. In that way you can selectively activate siliconBrain without polluting your standard environment.
The only thing your makefile must contain is:
include $(siliconBrainPath)/makefile
You can combine this step and the one before, if you just like to call siliconBrain features from within your makefile. Then you can leave your environment as it is and instead put two lines in your makefile:
export siliconBrainPath=dirWhereSiliconBrainIsInstalled
include $(siliconBrainPath)/makefile
Now that the root directory of your project is existing, you run make the first time. This will setup a directory tree and a couple of files, which should exist.
cd myProject
make
In your projects root directory you will have the following files:
AUTHORS
COPYING
COPYING.DOC
ChangeLog
INSTALL
INTRODUCTION
NEWS
README
RELEASE
TODO
distribution
documentation
makefile
siliconBrainInstall
temporary
You will never edit these files except ChangeLog. The meaning of most of these files is described in README. distribution contains all things which are needed to use your package. siliconBrainInstall is a program (actually it is a bash script), which installs your package elsewhere. In documentation you will now have the following files:
install.snippet.texinfo
news.snippet.texinfo
shortDescription.snippet.texinfo
todo.snippet.texinfo
introduction.snippet.texinfo
readme.snippet.texinfo
myProject.main.texinfo
authors.snippet.texinfo
longDescription.snippet.texinfo
shortCopyingDoc.snippet.texinfo
standardFiles.snippet.texinfo
Here myProject.main.texinfo is a frame where you put your main documentation in. For all the snippets, see DocumentationUsage.
Some of the documents, which are created as frames for your writing, are used in a lot of places to generate files, docs, html, .... So you are not allowed to delete them. And some should have a reasonable contents.
In the projects root dir write your hello world program in a file named helloWorld.main.c. There after or before write a program called testMain, which calls your helloWorld. Normally it will be implemented in testMain.main.c or testMain.bash.
testMain is automatically called by the makefile if it exists. Now you can compile and run your program by just entering make.
make web