Re: #include <math.h>
From: Joe Wright (joewwright_at_earthlink.net)
Date: 11/26/03
- Next message: Mark: "Re: [OT] Indian C programmers and "u""
- Previous message: Mike Wahler: "Re: [OT] Indian C programmers and "u""
- In reply to: jacob navia: "Re: #include <math.h>"
- Next in thread: Dan Pop: "Re: #include <math.h>"
- Reply: Dan Pop: "Re: #include <math.h>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 Nov 2003 00:07:15 GMT
jacob navia wrote:
>
[ snip ]
> This bug is similar to the make utility bug. Tabs are used as
> separator
> in "make", and the makefile will not work if they are substituted by
> spaces!
>
> This makes every novice spend hours trying to find out why two
> makefiles that look the
> same do not work.
I'm not sure I agree that it's a bug but it is annoying. make simply
uses TAB as a separator between the Rule and the Command portions of a
statement. As I use edit.com with tabs set to 3 this annoyed the hell
out of me too. Reading the info file on make one day (I'm surprised how
little I do this and how much I should) I read that ';' semicolon is
also a Rule / Command separator. How 'bout this..
# Use GNU make to build an executable for testing GE.
cc=gcc
obj=ge.o main.o
exe=main.exe
opt=-W -Wall -ansi -pedantic -O2 -c
# Note that semicolon (not TAB) separates Rule from Command on a line.
$(exe) : $(obj) ; $(cc) -s $(obj) -o $(exe)
ge.o : ge.c ; $(cc) $(opt) ge.c
main.o : main.c ge.h ; $(cc) $(opt) main.c
Live and learn.
-- Joe Wright http://www.jw-wright.com "Everything should be made as simple as possible, but not simpler." --- Albert Einstein ---
- Next message: Mark: "Re: [OT] Indian C programmers and "u""
- Previous message: Mike Wahler: "Re: [OT] Indian C programmers and "u""
- In reply to: jacob navia: "Re: #include <math.h>"
- Next in thread: Dan Pop: "Re: #include <math.h>"
- Reply: Dan Pop: "Re: #include <math.h>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|