home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / utils / bug / 2074 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.1 KB  |  89 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!manvm1.vnet.ibm.COM!GSCOTT
  3. From: GSCOTT@manvm1.vnet.ibm.COM
  4. Subject: (none)
  5. Message-ID: <9211180517.AA15811@life.ai.mit.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 18 Nov 1992 03:59:22 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 76
  12.  
  13. This problem is with make 3.62 running on AIX 3.2.2
  14.  
  15. Problem:  improper expansion of "$<" when using the following makefile.
  16.  
  17. ---
  18.  
  19. CC = gcc
  20. CFLAGS = -g -Wall
  21. LIBS = -lm
  22. PROG = lfa_null
  23.  
  24. OBJS = lfan_main.o lfan_track.o lfan_bf.o tb_bf.o
  25. SOURCES = lfan_main.c lfan_track.c lfan_bf.c tb_bf.c
  26. INCLUDES = lfa_null.h tb.h
  27.  
  28. all: $(PROG)
  29.  
  30. $(PROG): $(OBJS)
  31.     $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
  32.  
  33. $(OBJS): $(SOURCES) $(INCLUDES)
  34.     $(CC) $(CFLAGS) -c $<
  35.  
  36. ---
  37.  
  38. Below is a script illustrating the problem.
  39. /bin/make is the default AIX make
  40. /usr/local/gnu/make is gnu make 3.62
  41.  
  42. ---
  43.  
  44. $ /bin/make -n
  45.  
  46. gcc -g -Wall -c lfan_main.c
  47. gcc -g -Wall -c lfan_track.c
  48. gcc -g -Wall -c lfan_bf.c
  49. gcc -g -Wall -c tb_bf.c
  50. gcc -g -Wall -o lfa_null lfan_main.o lfan_track.o lfan_bf.o tb_bf.o -lm
  51.  
  52. $ /usr/local/gnu/make -n
  53.  
  54. gcc -g -Wall -c lfan_main.c
  55. gcc -g -Wall -c lfan_main.c
  56. gcc -g -Wall -c lfan_main.c
  57. gcc -g -Wall -c lfan_main.c
  58. gcc -g -Wall -o lfa_null lfan_main.o lfan_track.o lfan_bf.o tb_bf.o -lm
  59.  
  60. ---
  61.  
  62. Below is a script of what happens when the files must be retrieved
  63. with RCS.  Note, it retrieves all of the correct files, but still only
  64. tries to compile the first file in OBJS
  65.  
  66. ---
  67.  
  68. $ /usr/local/gnu/make -n
  69.  
  70. test -f lfan_main.c || co  RCS/lfan_main.c,v lfan_main.c
  71. test -f lfan_track.c || co  RCS/lfan_track.c,v lfan_track.c
  72. test -f lfan_bf.c || co  RCS/lfan_bf.c,v lfan_bf.c
  73. test -f tb_bf.c || co  RCS/tb_bf.c,v tb_bf.c
  74. test -f lfa_null.h || co  RCS/lfa_null.h,v lfa_null.h
  75. test -f tb.h || co  RCS/tb.h,v tb.h
  76. gcc -g -Wall -c lfan_main.c
  77. gcc -g -Wall -c lfan_main.c
  78. gcc -g -Wall -c lfan_main.c
  79. gcc -g -Wall -c lfan_main.c
  80. gcc -g -Wall  -o lfa_null lfan_main.o lfan_track.o lfan_bf.o tb_bf.o -lm
  81.  
  82. ---
  83.  
  84. George Scott
  85. gms2@po.cwru.edu
  86. gscott@manvm1.vnet.ibm.com
  87.  
  88.  
  89.