Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Question about makefile

Reply
Thread Tools

Question about makefile

 
 
fl
Guest
Posts: n/a
 
      10-11-2010
Hi,
I am learning a sample program for my project. When I run the make to
the Makefile (which is below ....... line) in a Linux OS, I get the
message below (between **** lines). I do not understand why make
generates 'ansi/MMakefile'. The make process halts there.
This is really bizarre. Could you tell me the reason? Thanks a lot.





*****************
cd bnd; make bnd.o
make[1]: Entering directory `/home/jeff/LDPC_examples/DavidMackay/MNC/
bnd'
Makefile:2: ansi/MMakefile: No such file or directory
make[1]: *** No rule to make target `ansi/MMakefile'. Stop.
make[1]: Leaving directory `/home/jeff/LDPC_examples/DavidMackay/MNC/
bnd'
make: *** [bnd/bnd.o] Error 2
****************
.....
# MAKEFILE FOR `code'

CFLAGS = $(INCDIRS) \
-ansi -pedantic -g \
-Wall -Wconversion -Wstrict-prototypes\
-Wformat -Wmissing-prototypes -Wshadow\
-Wpointer-arith -Wcast-qual -Wwrite-strings

# -O2 -funroll-loops
#
# to profile gprof opt2
# to not profile, remove -pg here and below.
#
# to optimize add -O2 -funroll-loops
CC = gcc
#

# LIBS = -L/home/mackay/lib -ldbmalloc -lm
LIBS = -lm

#clean:
# rm *.o

all: r2b s2t t2r t2y y2b r2z zb2x

tar:
tar cvf ../../pub/code/MNC.tar ./*.c ./*.h ./*_var ./
commander.p ./Makefile ./ansi/*.c ./ansi/*.h ./ansi/Makefile ./bnd/
bnd.c ./bnd/bnd.h ./bnd/Makefile ./bnd/bnd_var* ./bnd/commander.p ./
bnd/ansi ./SUMMARY _s/16 _s/4 _s/12 _r/12 _b/12 _y/12 _t/12 _z/12 _x/4
radford/mod2mat.h radford/mod2mat.c radford/Makefile codes/12.4.3.111
util/randfile
gzip -f ../../pub/code/MNC.tar

zb2x: zb2x.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o bnd/bnd.o ansi/
rand2b.o
$(CC) zb2x.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o bnd/bnd.o
ansi/rand2b.o $(LIBS) -o zb2x

ansi/smartall.o: ansi/smartall.c ansi/smartall.h
cd ansi; make smartall.o
zb2x.o: zb2x.c zb2x.h ansi/r.h ansi/rand2.h ansi/mynr.h ansi/cmatrix.h
bnd/bnd_var_str.h zb2x_var_str.h
s2t.o: s2t.c ansi/r.h ansi/rand2.h ansi/mynr.h ansi/cmatrix.h
s2t_var_str.h radford/mod2mat.h
s2t: s2t.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/rand2b.o radford/
mod2mat.o
$(CC) s2t.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/
rand2b.o radford/mod2mat.o $(LIBS) -o s2t
s2t_var_str.h: s2t_var commander.p
commander.p s2t_var
makecode.o: makecode.c ansi/r.h ansi/mynr.h ansi/cmatrix.h
mkcode_var_str.h radford/mod2mat.h
makecode: makecode.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/
rand2b.o radford/mod2mat.o
$(CC) makecode.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/
rand2b.o radford/mod2mat.o $(LIBS) -o makecode

mkcode_var_str.h: mkcode_var commander.p
commander.p mkcode_var
t2r.o: t2r.c ansi/r.h ansi/rand2.h ansi/mynr.h t2r_var_str.h
t2r: t2r.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/rand2b.o
$(CC) t2r.o ansi/r.o ansi/nrutil.o ansi/rand2b.o $(LIBS) -o
t2r
t2y.o: t2y.c ansi/r.h ansi/rand2.h ansi/mynr.h t2y_var_str.h
t2y: t2y.o ansi/r.o ansi/nrutil.o ansi/rand2b.o
$(CC) t2y.o ansi/r.o ansi/nrutil.o ansi/rand2b.o $(LIBS) -o
t2y
t2y_var_str.h: t2y_var commander.p
commander.p t2y_var
r2z.o: r2z.c ansi/r.h ansi/rand2.h ansi/mynr.h r2z_var_str.h
r2z: r2z.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/rand2b.o
$(CC) r2z.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/
rand2b.o $(LIBS) -o r2z
r2z_var_str.h: r2z_var commander.p
commander.p r2z_var
r2b.o: r2b.c ansi/r.h ansi/rand2.h ansi/mynr.h r2b_var_str.h
r2b: r2b.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/rand2b.o
$(CC) r2b.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o ansi/
rand2b.o $(LIBS) -o r2b
r2b_var_str.h: r2b_var commander.p
commander.p r2b_var
y2b.o: y2b.c ansi/r.h ansi/mynr.h y2b_var_str.h
y2b: y2b.o ansi/r.o ansi/nrutil.o ansi/cmatrix.o
$(CC) y2b.o ansi/r.o ansi/nrutil.o $(LIBS) -o y2b
y2b_var_str.h: y2b_var commander.p
commander.p y2b_var

radford/mod2mat.o: radford/mod2mat.c radford/mod2mat.h
cd radford ; make mod2mat.o
bnd/bnd.o: bnd/bnd.c bnd/bnd.h
cd bnd; make bnd.o
 
Reply With Quote
 
 
 
 
Seebs
Guest
Posts: n/a
 
      10-11-2010
On 2010-10-11, fl <(E-Mail Removed)> wrote:
> Hi,
> I am learning a sample program for my project. When I run the make to
> the Makefile (which is below ....... line) in a Linux OS, I get the
> message below (between **** lines). I do not understand why make
> generates 'ansi/MMakefile'. The make process halts there.
> This is really bizarre. Could you tell me the reason? Thanks a lot.


I don't see a C question here. Maybe try a newsgroup related to make?
I think people will often put up with make questions over in comp.unix.shell,
just because make is a shell utility.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
 
Reply With Quote
 
 
 
 
Jens Thoms Toerring
Guest
Posts: n/a
 
      10-11-2010
fl <(E-Mail Removed)> wrote:
> I am learning a sample program for my project. When I run the make to
> the Makefile (which is below ....... line) in a Linux OS, I get the
> message below (between **** lines). I do not understand why make
> generates 'ansi/MMakefile'. The make process halts there.
> This is really bizarre. Could you tell me the reason? Thanks a lot.


As Peter Seebach already pointed out the C newsgroup isn't the
ideal choice for asking questions about a "different language"
like the one make interprets. Another newsgroup you might con-
sider beside the one Peter pointed out is comp.unix.programer.

<off topic>

> cd bnd; make bnd.o
> make[1]: Entering directory `/home/jeff/LDPC_examples/DavidMackay/MNC/
> bnd'


This rather likely is due to the lines

> bnd/bnd.o: bnd/bnd.c bnd/bnd.h
> cd bnd; make bnd.o


from the Makefile you posted. This tells make to go into the
'bnd' subdirectory and start a new make process, using the
Makefile in that 'bnd' directory to create the target 'bnd.o'.

> Makefile:2: ansi/MMakefile: No such file or directory


And this probably is an error message from the secondary make
process, dealing with the Makefile in 'bnd'. So I would guess
that there's an instruction in that Makefile that requires a
file 'bnd/ansi/MMakefile' but which doesn't exist. Why this
file is needed can't then be said without seeing the Makefile
in the 'bnd' directory - what you posted is only the Makefile
of the directory that 'bnd' is in. So if you repost in a more
appropriate newsgroup I would recommend that you also post the
Makefile from the 'bnd' subdirectory.

</off topic>
Regards, Jens
--
\ Jens Thoms Toerring ___ (E-Mail Removed)
\__________________________ http://toerring.de
 
Reply With Quote
 
fl
Guest
Posts: n/a
 
      10-12-2010
On 11 oct, 15:53, (E-Mail Removed) (Jens Thoms Toerring) wrote:
> fl <(E-Mail Removed)> wrote:
> > I am learning a sample program for my project. When I run the make to
> > the Makefile (which is below ....... line) in a Linux OS, I get the
> > message below (between **** lines). I do not understand why make
> > generates 'ansi/MMakefile'. The make process halts there.
> > This is really bizarre. Could you tell me the reason? Thanks a lot.

>
> As Peter Seebach already pointed out the C newsgroup isn't the
> ideal choice for asking questions about a "different language"
> like the one make interprets. Another newsgroup you might con-
> sider beside the one Peter pointed out is comp.unix.programer.
>
> <off topic>
>
> > cd bnd; make bnd.o
> > make[1]: Entering directory `/home/jeff/LDPC_examples/DavidMackay/MNC/
> > bnd'

>
> This rather likely is due to the lines
>
> > bnd/bnd.o: * * *bnd/bnd.c bnd/bnd.h
> > * * * * cd bnd; make bnd.o

>
> from the Makefile you posted. This tells make to go into the
> 'bnd' subdirectory and start a new make process, using the
> Makefile in that 'bnd' directory to create the target 'bnd.o'.
>
> > Makefile:2: ansi/MMakefile: No such file or directory

>
> And this probably is an error message from the secondary make
> process, dealing with the Makefile in 'bnd'. So I would guess
> that there's an instruction in that Makefile that requires a
> file 'bnd/ansi/MMakefile' but which doesn't exist. Why this
> file is needed can't then be said without seeing the Makefile
> in the 'bnd' directory - what you posted is only the Makefile
> of the directory that 'bnd' is in. So if you repost in a more
> appropriate newsgroup I would recommend that you also post the
> Makefile from the 'bnd' subdirectory.
>
> </off topic>
> * * * * * * * * * * * * * * *Regards, Jens
> --
> * \ * Jens Thoms Toerring *___ * * *(E-Mail Removed)
> * *\__________________________ * * *http://toerring.de


Thanks.
The original C package is a little large and complex to me. There are
several makefile in different subdirectories. Could you help me to
check the website on the first source coding link?
http://www.inference.phy.cam.ac.uk/mackay/S0.html
I have tried many times still find no clues on the several makefiles.
Thanks again.
 
Reply With Quote
 
Jens Thoms Toerring
Guest
Posts: n/a
 
      10-12-2010
<sorry, off topic again>

fl <(E-Mail Removed)> wrote:
> The original C package is a little large and complex to me. There are
> several makefile in different subdirectories. Could you help me to
> check the website on the first source coding link?
> http://www.inference.phy.cam.ac.uk/mackay/S0.html
> I have tried many times still find no clues on the several makefiles.


I guess this is about

http://www.inference.phy.cam.ac.uk/m...ode/MNC.tar.gz

In that case the problem simply seems to be a broken package.
There's a symbolic link 'ansi' in 'bnd' that points to a non-
existend directory '../newansi'. And that, of course, throws
off make when it's asked to include the file 'MMakefile' from
the directory this (broken) link is supposed to point to (as
the Makefile in the 'bnd' subdirectory at line 2 does). The
only way to get that corrected is to ask to the authors of
the package, it's unlikely that anyone else will be able to
help you, sorry.

</off topic>
Regards, Jens
--
\ Jens Thoms Toerring ___ (E-Mail Removed)
\__________________________ http://toerring.de
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      10-12-2010
On Tue, 2010-10-12, Jens Thoms Toerring wrote:
> <sorry, off topic again>
>
> fl <(E-Mail Removed)> wrote:
>> The original C package is a little large and complex to me. There are
>> several makefile in different subdirectories. Could you help me to
>> check the website on the first source coding link?
>> http://www.inference.phy.cam.ac.uk/mackay/S0.html
>> I have tried many times still find no clues on the several makefiles.

>
> I guess this is about
>
> http://www.inference.phy.cam.ac.uk/m...ode/MNC.tar.gz
>
> In that case the problem simply seems to be a broken package.
> There's a symbolic link 'ansi' in 'bnd' that points to [...]
> the Makefile in the 'bnd' subdirectory at line 2 does). The
> only way to get that corrected is to ask to the authors of
> the package, it's unlikely that anyone else will be able to
> help you, sorry.


And the files are fifteen years old ...

I'd like to add that the packaging is awful:
- no version information
- the tarball spreads lots of tiny files in the current directory
when unpacked. Fortunately I expected that and unpacked it in a
temporary directory.
- Google "recursive make considered harmful"

You probably have to *be* the original author to make sense of it.
It doesn't seem intended for general use; he hasn't put the
needed effort into the packaging. (I don't mind that: you can place
anything on a web server. But reusable code doesn't come in packaging
like this.)

> </off topic>
> Regards, Jens


/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a question in makefile jut_bit_zx@eyou.com C++ 2 12-19-2006 02:10 PM
Makefile question Carson C Programming 1 07-04-2005 08:08 AM
Python in Makefile Question Dan Bishop Python 4 02-11-2005 02:41 PM
Question about simple gmake Makefile jose luis fernandez diaz C++ 1 04-29-2004 03:17 PM
Makefile question Matthias Pieroth C++ 3 03-05-2004 04:43 AM



Advertisments