Why "make"?
-
This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav
-
This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav
It is the same as the compiler. You can let the IDE set the options and generate the command, or you can run it yourself in a command window. Programs such as cl (the C/C++ compiler), make etc., have existed for years, long before the IDEs were developed. The IDEs just try to make life easier for you. I have a Visual Studio project that does not run the standard way so I had to create my own Makefile to build it. You are free to do that with any of your projects if you want greater control over how they are built.
-
This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav
Vaclav_ wrote:
I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ?
Your IDE probably creates the Makefile from some sort of project database, perhaps a .proj file. Lets assume that I create a library that you would like to use, but I use a different IDE than you, which uses Project.DB files that are completely different than the .proj files your IDE uses. If my project creates a Makefile that can be used from the command line, then you don't have to figure out how to import and build the library using your IDE, or how to install and use the IDE I use. Additionally, your IDE might clobber the Makefile distributed with my project, in which case you're going to have to go try to make sure you've got all the dependencies right, which might take a lot of time. In the land of UNIX like OS (Linux, BSD, Darwin, etc), make is almost ubiquitous. If the OS doesn't ship with make, someone will probably have a version of make (e.g. gnu-make) available. That means make is, more or less, the de facto build tool.
-
This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav
The answer to that is historic most of the original C compilers were around with DOS and Unix all we had was a command line. So on the command line you used to have to type these extremely long strings and so everyone wrote DOS batch files or unix shell scripts. Come 1976 and make was created by Stuart Feldman and it was released to public domain. Make never really took off with DOS users as by 1983 Windows 1.0 was released and a small company called Borland began with Pascal and later C as a text GUI on the windows platform. Borland - Wikipedia[^] Microsoft saw the success of Borland as a threat (they used DOS command line in house) and essentially began to mimic Borland at least on the GUI (the compiler remained a dos executable) and thus was born the first microsoft compiler tools. With no big bucks for GUI compilers being spent on linux make became a staple thing for the linux OS. Even most embedded compilers tended to stay as DOS or Windows with a couple of exceptions. So generally you could pick Windows versus Linux developers by did they know there way around make which developed it's own language. More recently GUI compiler IDE's started to pop up in linux and so they will import and work with Make files. Windows Visual Studio now can even work with make files as it is targetting linux developers although in all honesty they would like them to move to CMake. There is also a very subtle difference between windows and linux repositories because of the history that many linux programmers fail to notice. Most windows code has the header files for the C code files in the same directory, on most linux repositories you will find all the headers in an include directory (they seem to view it is good practice) and the source files elsewhere. The reason for the difference is Windows compilers have a specific search order which is same directory as C file, library directory and then user defined include directories. Under windows compiling #include is very different to #include "some.h" (the first means the C system directory the second means the user defined directory) on linux repositories that difference always seems to get lost (all the code is pubic domain none is company copyrighted) they randomly they use either -l or -L and fix it in the makefile. Under Windows you start messing around with the system directories you will get in a world of hurt (as
-
The answer to that is historic most of the original C compilers were around with DOS and Unix all we had was a command line. So on the command line you used to have to type these extremely long strings and so everyone wrote DOS batch files or unix shell scripts. Come 1976 and make was created by Stuart Feldman and it was released to public domain. Make never really took off with DOS users as by 1983 Windows 1.0 was released and a small company called Borland began with Pascal and later C as a text GUI on the windows platform. Borland - Wikipedia[^] Microsoft saw the success of Borland as a threat (they used DOS command line in house) and essentially began to mimic Borland at least on the GUI (the compiler remained a dos executable) and thus was born the first microsoft compiler tools. With no big bucks for GUI compilers being spent on linux make became a staple thing for the linux OS. Even most embedded compilers tended to stay as DOS or Windows with a couple of exceptions. So generally you could pick Windows versus Linux developers by did they know there way around make which developed it's own language. More recently GUI compiler IDE's started to pop up in linux and so they will import and work with Make files. Windows Visual Studio now can even work with make files as it is targetting linux developers although in all honesty they would like them to move to CMake. There is also a very subtle difference between windows and linux repositories because of the history that many linux programmers fail to notice. Most windows code has the header files for the C code files in the same directory, on most linux repositories you will find all the headers in an include directory (they seem to view it is good practice) and the source files elsewhere. The reason for the difference is Windows compilers have a specific search order which is same directory as C file, library directory and then user defined include directories. Under windows compiling #include is very different to #include "some.h" (the first means the C system directory the second means the user defined directory) on linux repositories that difference always seems to get lost (all the code is pubic domain none is company copyrighted) they randomly they use either -l or -L and fix it in the makefile. Under Windows you start messing around with the system directories you will get in a world of hurt (as
-
This is just curiosity , not a question. I code in C++ , using IDE. It "builds" the executable using "make" without me messing with "automatically generated" "make" by IDE. Accessing the "make " sometime warns that is it so generated by IDE and not to modify it. Most of the time I follow instructions, so I let IDE to do its stuff. I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ? I am sure there are occasions when IDE generated make could use some tweaking, but in general IDE does the job well. Off soap box. Cheers Vaclav
-
Quote:
I have noticed that some code posts here include manually building the "make". Why if run of the mill IDE does it "automatically" ?
Possibly because I am not using an
IDE
.Isn't bash an IDE?
-
Isn't bash an IDE?