LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   where is Makefile docs?? (https://www.linuxquestions.org/questions/programming-9/where-is-makefile-docs-341808/)

cb951303 07-10-2005 06:59 AM

where is Makefile docs??
 
hi guys, I was wondering, where can I find some papers about preparing my own Makefiles??

and also, if u know how to check if a directory exists, pls let me know

acid_kewpie 07-10-2005 10:19 AM

there's shedloads of docs on google:

http://www.google.com/search?q=makefile+howto

cb951303 07-10-2005 02:04 PM

ah you're so smart, how didn't I think of google,

unfortunatly, after looking 20000 site listed in google, I found exactly nothing about how can I use "conditions" like "if"

lowpro2k3 07-10-2005 02:17 PM

This is where I learned makefiles from: http://www.opussoftware.com/tutorial/TutMakefile.htm

I generally use autoconf nowadays though

serhosseini 07-11-2005 01:12 PM



I think using this command will give you some full reference of make and examples :

info make

Goodluck

Seyed Ehsan Hosseini

jonaskoelker 07-11-2005 04:09 PM

Quote:

Code:

$ info make

Which should be the official GNU make manual:
http://www.gnu.org/software/make/manual/make.html

My best advice: find a simple, handwritten makefile somewhere and use it as a `case study' in addition to the manual. And *do* experiment--learning by doing is your friend.

You can find the makefile to my old webpage(*) on http://jonaskoelker.homeunix.org/example.tgz -- for a short period. I wouldn't call it `simple', though.

(*) I used make to automagically do xslt-processing of xml-files. I have now moved over to using a DB (in order to learn *that* too :)).

hth --Jonas

Hko 07-12-2005 08:33 AM

Quote:

Originally posted by cb951303
unfortunatly, after looking 20000 site listed in google, I found exactly nothing about how can I use "conditions" like "if"
"make" has its own conditionals. They are explained in its info page. Type "info make conditionals" to go to that section directly.

Also, in the commands of the makefile-rules, you can use shell commands including "test", "if" and the like.


All times are GMT -5. The time now is 02:22 PM.