Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have recently began studying Makefiles in Linux. I have ample experience developing applications with advanced IDEs, such as Visual Studio.

My first impression and query after reading a few tutorials: is there any need to study Makefiles? Perhaps the IDEs are using it internally, but is this something everyone should learn eventually?

share|improve this question
6  
"Give a man a fish, feed him for a day. Teach an man how to fish, and he'll ask if fish roe is on the exam." –  Peter K. Jan 18 '13 at 0:46
2  
Give a man a fish, feed him for a day. Teach a man how to fish, then tax him 1 fish when he comes to shore. You eat everyday! –  Mathew Foscarini Jan 18 '13 at 2:24
1  
Teach a man to fish, and he has no use for you anymore. Give a man a fish, once, and you have him hooked for life. –  elssar Jan 18 '13 at 6:59
add comment

5 Answers

up vote 12 down vote accepted

Yes, even if you don't use them often, it's good to know how and why things work the way they do. Some environments may not support IDEs as such or the IDE for a new language might be immature or non-existent. You can also make a script that triggers a makefile, thereby allowing code that can autocompile without human intervention. Thus knowing how to make fully working programs out of many pieces is a good skill to have; even if you mostly use the autopilot version.

share|improve this answer
add comment

Yes, if you need advanced build options.

Visual Studio autogen project files, such as .csproj.

.csproj itself is a kind of XML-style makefile.

You can use a text editor to edit and customize .csproj if you need advanced options.

If you study MSBuild carefully, you will find that there are similar concepts to Makefile.

Build targets, include list of files, define properties, etc ...

share|improve this answer
add comment

An IDE and an Automated Build System have different purposes. An IDE is useful when your are developing the software and want to compile the code ect. An Automated Build System is useful when you want to Automate the building and compiling.

There are many situations in which an Automated System would help you out:

  1. Do you have a large project with a large number of developers contributing to your source control? How do you create a latest compiled build? Do you expect someone to be in-charge of compiling the latest version in their IDE?

  2. Does your project depend on some library that is developed by someone else on a different timeline? How do you manage their updates? Do you have to update that reference in your project manually and then build?

  3. Very often a project will have several different components. For example a web service and a Desktop and Mobile Client. What if you have some resources, say string values, or images that are common in all of them? How will you manage the updates in them? You wouldn't want to hunt down all of the references in your different projects and update them manually.

Makefiles in linux, are only one example of Automated Build system. There are several option for this even in the .NET world.

Though using and configuring such systems are strictly not necessary, you'll organize and streamline your development a lot if you learn and use these systems.

share|improve this answer
add comment

Yes. Because IDE's may not be helpful if you want to do automation. One of the Joel's test is one button automatic build. Makefiles can produce that. Also such build can also be fired from the remote machine, without much hassles.
I am not aware of power of IDEs on linux, but Makefile also helps in doing more stuffs than pure compile. They can also be used for installation, dependency check, and pre-compile installation. You can also combine them with shell scripts, and do multiple builds.

share|improve this answer
add comment

There are an unlimited number of things to learn with an unlimited depth to which they can be learned.

Since you will </life> far before you learn it all, you need to prioritize which you will focus on.

If you are a windows developer using windows tools, then learning unix makefiles may not be a big advantage. If you are a c developer on any platform, it is probably a good idea.

Keep in mind different platforms and languages have different approaches to the same problem, eg apache ant with java.

So it really depends on where you are headed in your career/learning. IMO, becoming an expert at version control software (eg, git) is one of the best things any software engineer can do, if they haven't already.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.