[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #include in a C file
From: |
ali hagigat |
Subject: |
Re: #include in a C file |
Date: |
Mon, 6 Dec 2010 11:02:38 +0330 |
In section 4.13, we have the following example:
----------------------------------------------------------
%.d: %.c
@set -e; rm -f $@; \
$(CC) -M $(CPPFLAGS) $< > address@hidden; \
sed ’s,\($*\)\.o[ :]*,\1.o $@ : ,g’ < address@hidden > $@; \
rm -f address@hidden
----------------------------------------------------------
Under what conditions this implicit rule is executed?
Would you please give an example?
Why the 'sed' command is necessary? and why we need to have the following rule:
main.o main.d : main.c defs.h
Can the command, 'sed' be replaced with:
cp address@hidden $@
(I mean we have one .d file for each .c file and it will be included,
why we need a rule like main.d : main.c defs.h? This rule is without
recipe and what is it supposed to do?)
- Re: #include in a C file, (continued)
- Re: #include in a C file, Paul Smith, 2010/12/01
- Re: #include in a C file, David Boyce, 2010/12/01
- Re: #include in a C file, ali hagigat, 2010/12/04
- Re: #include in a C file, Sam Ravnborg, 2010/12/04
- Re: #include in a C file, ali hagigat, 2010/12/05
- Re: #include in a C file, Sam Ravnborg, 2010/12/05
- Re: #include in a C file, ali hagigat, 2010/12/05
- Re: #include in a C file, Sam Ravnborg, 2010/12/05
- Re: #include in a C file,
ali hagigat <=
- Re: #include in a C file, Sam Ravnborg, 2010/12/06
- Re: #include in a C file, ali hagigat, 2010/12/06
- Re: #include in a C file, Paul Smith, 2010/12/06
- Re: #include in a C file, ali hagigat, 2010/12/07
- Re: #include in a C file, Noel David Torres Taño, 2010/12/07
- Re: #include in a C file, Sam Ravnborg, 2010/12/06
- Re: #include in a C file, Björn Michaelsen, 2010/12/04