home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / utils / bug / 1495 < prev    next >
Encoding:
Text File  |  1992-09-08  |  8.1 KB  |  273 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!hing.lcs.mit.edu!metcalf
  3. From: metcalf@hing.lcs.mit.edu (Chris Metcalf)
  4. Subject: finger-1.35: Makefile problems for --srcdir builds
  5. Message-ID: <9209061703.AA01963@hing.LCS.MIT.EDU>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Sun, 6 Sep 1992 09:03:02 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 260
  12.  
  13. I built Gnu finger 1.35 using the --srcdir option to specify a
  14. different directory for the sources.  This did about half the right
  15. things, given my version of make (not a Gnu make but a SunOS-ish make 
  16. in use at MIT LCS that understand VPATH and other interesting things).
  17. The changes below convert, for sources, relative path references into
  18. references prefixed with $(srcdir).  targets/Makefile.in requires a
  19. definition of $srcdir for this to work.
  20.  
  21. I also replaced uses of Gnu make -C with explicit "cd foo; make" to
  22. be more portable.
  23.  
  24. Though not mentioned in the patches, I believe the right thing to do
  25. in lib/x_show_face.c is to use "#ifndef X11R3" instead of "#ifdef
  26. X11R4", since X11R5 treats the Xaw stuff just like X11R4.
  27.  
  28. Chris Metcalf
  29. MIT Lab for Computer Science
  30.  
  31.  
  32. *** 1.1    1992/09/06 02:24:11
  33. --- src/Makefile.in    1992/09/06 12:18:35
  34. ***************
  35. *** 4,12 ****
  36.   
  37.   BINDIR = /usr/local/bin
  38.   ETCDIR = /usr/local/etc
  39. ! INCFLAGS = -I.. -I../include
  40. ! INCLUDES = ../include
  41. ! SUPPORT = ../support
  42.   
  43.   FINGERLIB = ../lib
  44.   
  45. --- 4,12 ----
  46.   
  47.   BINDIR = /usr/local/bin
  48.   ETCDIR = /usr/local/etc
  49. ! INCFLAGS = -I$(srcdir)/.. -I$(srcdir)/../include
  50. ! INCLUDES = $(srcdir)/../include
  51. ! SUPPORT = $(srcdir)/../support
  52.   
  53.   FINGERLIB = ../lib
  54.   
  55. ***************
  56. *** 55,78 ****
  57.           $(LINKCMD) $(CFLAGS) -o in.fingerd in.fingerd.o $(LIBR)
  58.   
  59.   $(FINGERLIB):
  60. !         $(MAKE) -C $(FINGERLIB)
  61.   
  62.   .fingerdir: $(INCLUDES)/fingerpaths.h
  63.       $(SUPPORT)/prdefine FINGERDIR $(INCLUDES)/fingerpaths.h >.fingerdir
  64.   
  65. ! .etcdir:  ../config.h
  66. !     $(SUPPORT)/prdefine EtcDir ../config.h >.etcdir
  67.   
  68. ! .bindir:  ../config.h
  69. !     $(SUPPORT)/prdefine BinDir ../config.h >.bindir
  70.   
  71. ! fingerd.o: fingerd.c $(INCLUDES)/client.h $(INCLUDES)/packet.h $(INCLUDES)/tcp.h ../config.h
  72. ! fingerd.o: $(INCLUDES)/error.h $(INCLUDES)/fingerpaths.h ../config.h
  73. ! finger.o: finger.c $(INCLUDES)/fingerpaths.h $(INCLUDES)/packet.h ../config.h
  74. ! finger.o: $(INCLUDES)/tcp.h $(INCLUDES)/error.h ../config.h
  75.   
  76. ! in.fingerd.o: in.fingerd.c $(INCLUDES)/client.h $(INCLUDES)/packet.h ../config.h
  77. ! in.cfingerd.o: in.cfingerd.c $(INCLUDES)/client.h $(INCLUDES)/packet.h ../config.h
  78.   
  79.   server:    install
  80.   
  81. --- 55,78 ----
  82.           $(LINKCMD) $(CFLAGS) -o in.fingerd in.fingerd.o $(LIBR)
  83.   
  84.   $(FINGERLIB):
  85. !         cd $(FINGERLIB); $(MAKE) $(FINGERLIB)
  86.   
  87.   .fingerdir: $(INCLUDES)/fingerpaths.h
  88.       $(SUPPORT)/prdefine FINGERDIR $(INCLUDES)/fingerpaths.h >.fingerdir
  89.   
  90. ! .etcdir:  $(srcdir)/../config.h
  91. !     $(SUPPORT)/prdefine EtcDir $(srcdir)/../config.h >.etcdir
  92.   
  93. ! .bindir:  $(srcdir)/../config.h
  94. !     $(SUPPORT)/prdefine BinDir $(srcdir)/../config.h >.bindir
  95.   
  96. ! fingerd.o: fingerd.c $(INCLUDES)/client.h $(INCLUDES)/packet.h $(INCLUDES)/tcp.h $(srcdir)/../config.h
  97. ! fingerd.o: $(INCLUDES)/error.h $(INCLUDES)/fingerpaths.h $(srcdir)/../config.h
  98. ! finger.o: finger.c $(INCLUDES)/fingerpaths.h $(INCLUDES)/packet.h $(srcdir)/../config.h
  99. ! finger.o: $(INCLUDES)/tcp.h $(INCLUDES)/error.h $(srcdir)/../config.h
  100.   
  101. ! in.fingerd.o: in.fingerd.c $(INCLUDES)/client.h $(INCLUDES)/packet.h $(srcdir)/../config.h
  102. ! in.cfingerd.o: in.cfingerd.c $(INCLUDES)/client.h $(INCLUDES)/packet.h $(srcdir)/../config.h
  103.   
  104.   server:    install
  105.   
  106. *** 1.1    1992/09/06 02:25:20
  107. --- lib/Makefile.in    1992/09/06 02:25:44
  108. ***************
  109. *** 4,11 ****
  110.   #
  111.   srcdir = @srcdir@
  112.   VPATH = $(srcdir)
  113. ! INCLUDES = ../include
  114. ! INCFLAGS = -I$(INCLUDES) -I..
  115.   RM = rm -f
  116.   AR = ar
  117.   
  118. --- 4,11 ----
  119.   #
  120.   srcdir = @srcdir@
  121.   VPATH = $(srcdir)
  122. ! INCLUDES = $(srcdir)/../include
  123. ! INCFLAGS = -I$(INCLUDES) -I$(srcdir)/..
  124.   RM = rm -f
  125.   AR = ar
  126.   
  127. ***************
  128. *** 64,70 ****
  129.   $(SITE_OBJECTS): $(SITE_SOURCES)
  130.       (cd site; $(MAKE) all)
  131.   
  132. ! $(SITE_SOURCES): ../config.h $(INCLUDES)/fingerpaths.h
  133.   
  134.   clean:
  135.       rm -f TAGS Makefile *.o *.a $(OTHER_FILES)
  136. --- 64,70 ----
  137.   $(SITE_OBJECTS): $(SITE_SOURCES)
  138.       (cd site; $(MAKE) all)
  139.   
  140. ! $(SITE_SOURCES): $(srcdir)/../config.h $(INCLUDES)/fingerpaths.h
  141.   
  142.   clean:
  143.       rm -f TAGS Makefile *.o *.a $(OTHER_FILES)
  144. ***************
  145. *** 77,83 ****
  146.   tcp.o: tcp.c  $(INCLUDES)/tcp.h
  147.   tty.o: $(INCLUDES)/fingerpaths.h
  148.   util.o: $(INCLUDES)/fingerpaths.h util.c
  149. ! bitmap.o: bitmap.c $(INCLUDES)/bitmap.h ../config.h
  150.   read_bitmap.o: read_bitmap.c $(INCLUDES)/bitmap.h
  151.   read_rastfile.o: read_rastfile.c $(INCLUDES)/bitmap.h
  152.   read_x_bitmap.o: read_x_bitmap.c $(INCLUDES)/bitmap.h
  153. --- 77,83 ----
  154.   tcp.o: tcp.c  $(INCLUDES)/tcp.h
  155.   tty.o: $(INCLUDES)/fingerpaths.h
  156.   util.o: $(INCLUDES)/fingerpaths.h util.c
  157. ! bitmap.o: bitmap.c $(INCLUDES)/bitmap.h $(srcdir)/../config.h
  158.   read_bitmap.o: read_bitmap.c $(INCLUDES)/bitmap.h
  159.   read_rastfile.o: read_rastfile.c $(INCLUDES)/bitmap.h
  160.   read_x_bitmap.o: read_x_bitmap.c $(INCLUDES)/bitmap.h
  161. ***************
  162. *** 87,93 ****
  163.   save_rastfile.o: save_rastfile.c $(INCLUDES)/bitmap.h
  164.   save_x_bitmap.o: save_x_bitmap.c $(INCLUDES)/bitmap.h
  165.   save_lispmug.o: save_lispmug.c $(INCLUDES)/bitmap.h
  166. ! x_show_face.o: x_show_face.c $(INCLUDES)/bitmap.h ../config.h
  167.   sun_show_face.o: sun_show_face.c $(INCLUDES)/bitmap.h
  168.   face-finger.o: face-finger.c $(INCLUDES)/fingerpaths.h $(INCLUDES)/bitmap.h
  169.   text-finger.o: text-finger.c $(INCLUDES)/fingerpaths.h $(INCLUDES)/packet.h
  170. --- 87,93 ----
  171.   save_rastfile.o: save_rastfile.c $(INCLUDES)/bitmap.h
  172.   save_x_bitmap.o: save_x_bitmap.c $(INCLUDES)/bitmap.h
  173.   save_lispmug.o: save_lispmug.c $(INCLUDES)/bitmap.h
  174. ! x_show_face.o: x_show_face.c $(INCLUDES)/bitmap.h $(srcdir)/../config.h
  175.   sun_show_face.o: sun_show_face.c $(INCLUDES)/bitmap.h
  176.   face-finger.o: face-finger.c $(INCLUDES)/fingerpaths.h $(INCLUDES)/bitmap.h
  177.   text-finger.o: text-finger.c $(INCLUDES)/fingerpaths.h $(INCLUDES)/packet.h
  178. *** 1.1    1992/09/06 02:25:54
  179. --- lib/site/Makefile.in    1992/09/06 02:26:48
  180. ***************
  181. *** 26,32 ****
  182.   # The object files for making site.o.
  183.   OBJECTS = $(Objects)
  184.   
  185. ! INCFLAGS = -I../../include -I../..
  186.   
  187.   all: site.o $(ExtraProgs)
  188.   
  189. --- 26,32 ----
  190.   # The object files for making site.o.
  191.   OBJECTS = $(Objects)
  192.   
  193. ! INCFLAGS = -I$(srcdir)/../../include -I$(srcdir)/../..
  194.   
  195.   all: site.o $(ExtraProgs)
  196.   
  197. ***************
  198. *** 48,55 ****
  199.   mkpasswd: mkpasswd.o recedit.o ../util.o
  200.       $(CC) $(CFLAGS) $(DEFS) $(INCFLAGS) -o mkpasswd mkpasswd.o recedit.o ../util.o $(LIBS) $(LIBOBJS) -ldbm
  201.   
  202. ! ../util.o: ../util.c
  203. !     $(MAKE) -C .. util.o
  204.   
  205.   install:
  206.   
  207. --- 48,55 ----
  208.   mkpasswd: mkpasswd.o recedit.o ../util.o
  209.       $(CC) $(CFLAGS) $(DEFS) $(INCFLAGS) -o mkpasswd mkpasswd.o recedit.o ../util.o $(LIBS) $(LIBOBJS) -ldbm
  210.   
  211. ! ../util.o: $(srcdir)/../util.c
  212. !     cd ..; $(MAKE) util.o
  213.   
  214.   install:
  215.   
  216. ***************
  217. *** 56,64 ****
  218.   clean:
  219.       rm -f TAGS *.o *.a Makefile $(ExtraProgs)
  220.   
  221. ! userinfo.o: userinfo.c ../../config.h
  222. ! userface.o: userface.c ../../config.h
  223. ! dbminfo.o: dbminfo.c ../../include/fingerpaths.h
  224.   makeusers.o: makeusers.c recedit.h
  225.   recedit.o: recedit.c
  226.   edituser.o: edituser.c recedit.h
  227. --- 56,64 ----
  228.   clean:
  229.       rm -f TAGS *.o *.a Makefile $(ExtraProgs)
  230.   
  231. ! userinfo.o: userinfo.c $(srcdir)/../../config.h
  232. ! userface.o: userface.c $(srcdir)/../../config.h
  233. ! dbminfo.o: dbminfo.c $(srcdir)/../../include/fingerpaths.h
  234.   makeusers.o: makeusers.c recedit.h
  235.   recedit.o: recedit.c
  236.   edituser.o: edituser.c recedit.h
  237. *** 1.1    1992/09/06 16:11:17
  238. --- targets/Makefile.in    1992/09/06 16:12:32
  239. ***************
  240. *** 1,6 ****
  241.   # Install default targets.
  242.   
  243. ! INCLUDE = ../include
  244.   
  245.   all:
  246.       
  247. --- 1,7 ----
  248.   # Install default targets.
  249.   
  250. ! srcdir = @srcdir@
  251. ! INCLUDE = $(srcdir)/../include
  252.   
  253.   all:
  254.       
  255. ***************
  256. *** 9,15 ****
  257.   
  258.   install: .targetdir
  259.       -if [ ! -r `cat .targetdir` ] ; then mkdir `cat .targetdir`; fi
  260. !     cp [slx]-* `cat .targetdir`
  261.       chmod 755 `cat .targetdir`/*
  262.   
  263.   server:    install
  264. --- 10,16 ----
  265.   
  266.   install: .targetdir
  267.       -if [ ! -r `cat .targetdir` ] ; then mkdir `cat .targetdir`; fi
  268. !     cp $(srcdir)/[slx]-* `cat .targetdir`
  269.       chmod 755 `cat .targetdir`/*
  270.   
  271.   server:    install
  272.  
  273.