Pick a Free OS

User login

Navigation

Introducing Motor: An IDE for Linux

build a project. It's F9. If no errors occur

(hope, there are no errors in our "Hello, world" ;), "Compiled

successfully" will be written in the line at the bottom of the

screen. That means the executable is ready to run. Press F12. Voila!

Small note. Motor runs the program on separate console so you should

have a free local tty. After execution you can see the program output

by switching to that console. Assuming the first free tty on our box

was /dev/tty9, simply press Alt-F9 and see "Hello, world!" printed by

the program.

No need to explain how to debug "Hello, world!", since such programs

usually don't need it ;) But if you want to try this feature,

you can execute it line-by-line using the F8 key.

Other debug-mode keys are listed in the "Debug" submenu.

But as far as we remember, building an executable is not our final

goal. Now we want to see how it can be easily turned into a real GNU

program that is distributed as tar.gz or rpm packages. In Motor it

can be done with a single dialog. To open it, go to the "Project" menu

and select "Make a package".

Generating tar.gz and a configure script

Select "tar.gz" as a type of distribution and turn on autoconf usage.

Also we want the binary to be installed to /bin directory with prefix

set to where the user wants it to reside. That means we have to add an

install rule. Every time we select "add" here, we are asked two

questions: file name and destination directory. So, first we enter

"helloworld" and then "$(PREFIX)/bin/". Now, select "Generate". For

the first when no configure.in file exists, motor

generates it automatically. Leave it unchanged if you don't know what

to write there. I strongly suggest you read autoconf info with the

"info autoconf" command to find out how to write configure.in. Then

you should revise it and open the dialog again. Now, everything is

ready. After selecting "Generate" item, the tarball will appear in the

specified output directory.

Generating .rpm

This move will be a little more complicated. The point is that rpm

requires a special .spec file. So first you have to invoke the "project

files" dialog with F11 and add helloworld.spec file to the