Problem with make

Problem with make

Post by S. Kawal » Mon, 23 Nov 1998 04:00:00



I am having a problem with the make command that comes with AIX 4.3.1.
Specifically, AIX's make seems to be confused by recently modified source
files and will recompile the source files but will not perform the link
step.

I have attached a sample makefile below along with logs obtained when using
this makefile with the make command under AIX 4.3.1 and IRIX 6.x. Under AIX
touching one of the source files and then entering make will cause the
source file to be recompiled but the executable won't be relinked. On the
other hand, under IRIX 6.x (and previous versions) make seems to be smart
enough to recompile and then relink the executable when one of the source
files is modified.

I have tried using both "make all" and "make main" under AIX to force make
to build the executable. Using "make all" usually results is make issuing a
message like

  Target "all" is up to date

Using "make main" seems to force make to perform the link command but it
also seems to force make to recompile all of the source files.

Is there something wrong with my makefile, with AIX's make or is the
behavior of make under IRIX nonstandard?

--------
makefile
--------

SRC = main.f  sinc.f  constants.f
OBJ = main.o  sinc.o  
CMD = main

all: $(CMD)

main: main.o  sinc.o
   $(FC) -o main  main.o sinc.o

main.o: constants.f  main.f

sinc.o: constants.f  sinc.f

clean:
   rm $(CMD) $(OBJ)

------------------
Log for AIX 4.3.1:
------------------
aix $ make clean
   rm main main.o  sinc.o  
aix $ make
   xlf -O -c main.f
** main   === End of Compilation 1 ===
1501-510  Compilation successful for file main.f.
   xlf -O -c sinc.f
** sinc   === End of Compilation 1 ===
1501-510  Compilation successful for file sinc.f.
   xlf -o main  main.o sinc.o
Target "all" is up to date.
aix $ touch main.f
aix $ make
   xlf -O -c main.f
** main   === End of Compilation 1 ===
1501-510  Compilation successful for file main.f.
   xlf -O -c sinc.f
** sinc   === End of Compilation 1 ===
1501-510  Compilation successful for file sinc.f.
Target "all" is up to date.
aix $ touch sinc.f
aix $ make
   xlf -O -c main.f
** main   === End of Compilation 1 ===
1501-510  Compilation successful for file main.f.
   xlf -O -c sinc.f
** sinc   === End of Compilation 1 ===
1501-510  Compilation successful for file sinc.f.
Target "all" is up to date.
aix $ touch constants.f
aix $ make
   xlf -O -c main.f
** main   === End of Compilation 1 ===
1501-510  Compilation successful for file main.f.
   xlf -O -c sinc.f
** sinc   === End of Compilation 1 ===
1501-510  Compilation successful for file sinc.f.
Target "all" is up to date.

-----------------
Log for IRIX 6.x:
-----------------
irix $ make clean
        rm main main.o  sinc.o  
irix $ make
        f77 -O -c main.f
        f77 -O -c sinc.f
        f77 -o main  main.o sinc.o
irix $ touch main.f
irix $ make
        f77 -O -c main.f
        f77 -o main  main.o sinc.o
irix $ touch sinc.f
irix $ make
        f77 -O -c sinc.f
        f77 -o main  main.o sinc.o
irix $ touch constants.f
irix $ make
        f77 -O -c main.f
        f77 -O -c sinc.f
        f77 -o main  main.o sinc.o

S. Kawalko

 
 
 

1. problem with making xpm

Dear all,

I am current with some games in linux with gtk+, I would like to add graphic
into my program, i have found that it is only supported xpm graphic format.
Am i right? Where can i download some software in order to make xpm graphic
format?

Thanks all.

2. ZyXEL modem info/help

3. SLIP problem is making me sleep --- PLEEEAAAAAASE help

4. solaris as a router

5. lilo problems in making bootable cd

6. Need a big backupsolution...

7. Problems with making a PPP connection

8. Nic config and vtoc on linux

9. byteorder.h problem in making tripwire1.2 on solaris 2.6

10. Problem in making X11R6

11. problems compiling/making NCSA httpd

12. lilo problems in making bootable cd

13. problem in making kernel v2.0.33