LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Makefile (https://www.linuxquestions.org/questions/linux-software-2/makefile-267752/)

alice95089 12-18-2004 11:54 AM

Makefile
 
Hi all,
1. I would like to ask what is the meaning of $i in the following sentense i found in Makefile. why do use the $i instead of $$i?

for i in $(SUBDIRS) ; do \
( cd $$i; make) ;\
done

2. The following sentence found in Makefile
rm -f *~

I would like to ask what is the meaning of *~?
why don't just use "rm -f *" instead?

3. I woluld like to ask:
ar -cr $(LIBCOMMON) $(OBJ)
ranlib $(LIBCOMMON)

what do the above sentence meain( also found in Makefile)?

Thanks

Cerulean 12-18-2004 12:35 PM

Quote:

for i in $(SUBDIRS) ; do \
( cd $$i; make) ;\
done
That interperets (sic) all the code in between the "do" and "done", each time assigning the value of the next item in $SUBDIRS to $i.

Quote:

rm -f *~

would like to ask what is the meaning of *~?
why don't just use "rm -f *" instead?
That above deletes everything ending in a ~ in the current directory - Usually back up files.
rm -f * deletes everything in the current directory.

Quote:

3. I woluld like to ask:
ar -cr $(LIBCOMMON) $(OBJ)
ranlib $(LIBCOMMON)
...
Read the man pages for ar and ranlib.

alice95089 12-19-2004 08:14 PM

I am not understand =)
 
HI,

Really thanks for you reply! =)

Alice

alice95089 12-19-2004 08:15 PM

I am not understand =)
 
HI cerulean,

Really thanks for you reply! =)

Alice


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