View Full Version : Guide to make-files (not experienced)

March 11th, 2009, 07:15 PM

I have set my self a goal; I want to learn how to make those make-files, therefter pack them and send it to a repository.

Now, I have been programming for a while, but I have never done something useful in anyway (general-purpose oriented), so I have never had to make the installation scripts (make-file) and pack it or anything, but I think its time I learn how to do that.

I've found different packaging guides (https://wiki.ubuntu.com/PackagingGuide/Complete for example), but first I have to create the make-files, and I can't find anything that feels like a good guide, so I'm hoping you guys know some guide og reference I can use.

I look forward to your answers!

March 11th, 2009, 08:58 PM
I learnt how to do makefiles I used this guide, found it really good and still refer back to it every now and then.


March 11th, 2009, 09:21 PM
This is a great ressource too: http://crasseux.com/books/ctutorial/Writing-a-makefile.html

March 12th, 2009, 12:15 AM
Thanks for the links, guys! I'm a little confused though...

Let me explain it to you;
I have a folder and inside that folder I have a gn.py, user.conf, emails.db, man_conf/__init__.py, man_cron/__init__.py, man_db/__init__.py. I also have a symbolink link to gn.py in /usr/local/bin/.

Now I need to make those things so I have, lets say, a folder called foobar, and inside that, one can do ./configure -- make -- make install, and then everything get's setup the right way - some files goes to ~/.gn and one to /usr/local/bin/.

Is that the make file that does those things? For what I can see from your links, it's not, but I haven't read em, just looked through to find out what it was.

Can you guys explain the process to me, of what does what?

March 12th, 2009, 12:31 AM
It seems that what you are after is actually autotools the one source I generally refer people to is this one:


but seeing as you are using python this one will probably also be useful: