home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / utils / sercli.shr / sercli / src / dmakefile < prev    next >
Encoding:
Makefile  |  1993-06-16  |  3.9 KB  |  149 lines

  1. ##  $Source: WB_2.1:homes/rkr/prog/sercli/src/RCS/dmakefile,v $
  2. ##  $Author: rkr $
  3. ##  $Revision: 1.13 $
  4. ##  $Locker: rkr $
  5. ##  $State: Exp $
  6. ##  $Date: 1993/06/16 23:34:36 $
  7. ##
  8. ##  sercli (an Amiga .device <-> FIFO interface tool)
  9. ##  Copyright (C) 1993  Richard Rauch
  10. ##
  11. ##  See /doc/sercli.doc and /COPYING for use and distribution license.
  12. ##
  13.  
  14. ##  Can't easily make it all -mRR, right now, since there is no @BeginIO()
  15. ##  for register arg entry (also fifo stuff doesn't look like it will
  16. ##  support it).
  17. ##
  18.  
  19.  
  20. ##  $(name) is relatively constant
  21. ##  $(version) we _could_ export to another file, but
  22. ##  $(symbol) is closely tied to $(version), and _has_ to be available here.
  23. ##  (I suppose we might get away with using an ENV/shell var...)
  24. ##
  25. name    = sercli
  26. version = v1.10
  27. symbol    = sercli_v1_10
  28.  
  29.  
  30. ##  od         == temp place to put objects during compilation
  31. ##  exe      == The primary target of all of this
  32. ##  srcs     == Compilables (given to the C compiler)
  33. ##  objs     == Intended output of the C compiler
  34. ##  hdrs     == list of all header files (#?.h) that $(srcs) need
  35. ##
  36. od    = dtmp:sercli/
  37. exe    = /bin/sercli
  38. srcs    = serial.c sercli.c misc.c config.c sercli-config.c rexx.c keywords.c errors.c
  39. objs    = $(srcs:"*.c":"$(od)%1.o")
  40. hdrs    = config.h keywords.h sercli-config.h ser_supp.h misc.h rexx.h defs.h errors.h fifo_pragmas.h fifo.h
  41.  
  42.  
  43. ##  allfiles == every non-changes file that is manually written in this dir
  44. ##  rcsfiles == set of RCS files for $(allfiles)
  45. ##
  46. allfiles= $(srcs) $(hdrs) dmakefile
  47. rcsfiles= $(allfiles:"*":"rcs/%1,v")
  48.  
  49.  
  50. ##  chgs     == the changes list (in changes/ relative to this dir)
  51. ##  ch_dummy == non-existant files; $(chgs) are all always out of date
  52. ##  ch_text  == end-user changes doc (needs trimming)
  53. ##
  54. chgs    = $(allfiles:"*":"changes/%1")
  55. ch_dummy= $(chgs:"*":"no-such-file-%1")
  56. ch_text = /doc/changes.text
  57.  
  58.  
  59. cflags    = -no-env -r -2.0 -// -c -proto
  60. lflags    = -no-env -r -2.0
  61. comp    = dcc $(cflags)
  62. link    = dcc $(lflags)
  63.  
  64.  
  65. ##  Make everything
  66. ##
  67. all : version.h $(exe) tags
  68.  
  69.  
  70. ##  Clear out object code...(and executable?)
  71. ##
  72. clean :
  73.     delete $(od)#?
  74.  
  75.  
  76. ##  To make a release, we pro'ly want to update the changes text and do a
  77. ##  full RCS checkin/symbolic bind.  The order is important since the RCS
  78. ##  target can find straglers that haven't been checked in, so it Types the
  79. ##  appropriate changes file before doing the ci.
  80. ##
  81. release : changes rcs
  82.  
  83.  
  84. ##  Optional; update this when making a release.
  85. ##
  86. changes : $(ch_dummy) $(ch_text)
  87.     echo "*n--  Finished updating $(ch_text).*N    You may wish to prune it manually."
  88.  
  89.  
  90. ##    rx addlog t:version_changes
  91. ##
  92. $(ch_text) :
  93.     echo >  t:version $(name) $(version) ($(symbol))
  94.     echo >> t:version ""
  95.     join t:version t:changes /doc/changes.text as t:u2
  96.     copy t:u2 /doc/changes.text
  97.     join t:version t:changes as t:version_changes
  98.     delete t:version t:changes t:u2 t:version_changes
  99.  
  100.  
  101. ##  Update $(ch_text) (log of changes)
  102. ##
  103. $(ch_dummy) : $(chgs)
  104.     type >> t:changes %(right)
  105.     echo >> t:changes ""
  106.     echo >  %(right) noline
  107.  
  108.  
  109. ##  Create version.h file...
  110. ##
  111. version.h :
  112.     echo >  version.h "#define NAME    *"$(name)*""
  113.     echo >> version.h "#define VERSION *"$(version)*""
  114.  
  115.  
  116. ##  make sure all are checked in, then set the RCS symbolic name
  117. ##
  118. rcs : $(rcsfiles)
  119.     rcs -N$(symbol): rcs/#?,v
  120.  
  121.  
  122. ##  For each file in $(allfiles), make sure it's checked in.  changes/#?
  123. ##  files FORMERLY were used to to fetch a list of changed info.  Now that
  124. ##  checkins are done independant of this makefile, the work is to simply
  125. ##  make sure the latest version of each file is checked in.
  126. ##
  127. $(rcsfiles) : $(allfiles)
  128.     echo %(right) appears newer than its RCS file.
  129.     rlog -r %(right)
  130.     type changes/%(right)
  131.     rcsdiff %(right) %(left)
  132.     ci -l %(right)
  133.  
  134.  
  135. ##  Can't do this w/o ctags
  136. ##    delete tags
  137. ##
  138. tags : $(srcs)
  139.     echo "No tags to do this: ctags $(srcs)"
  140.  
  141.  
  142. ##  $(link) -o $(exe) $(objs) -l fifos -l rexxglue.o
  143. $(exe) : $(objs)
  144.     $(link) -o $(exe) $(objs) -l fifos
  145.  
  146.  
  147. $(objs) : $(srcs)
  148.     $(comp) -o %(left) %(right)
  149.