lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Makefile rule for a lout document


From: Valeriy E. Ushakov
Subject: Re: Makefile rule for a lout document
Date: Fri, 1 Aug 1997 16:17:06 +0400 (MSD)

On Fri, 1 Aug 1997, Jeff Kingston wrote:

> Just be warned that the absence of "undefined cross reference" messages
> is not the same thing as having a completed document.
>
> A cross reference can be defined, yet not have its final value.

Yes, mea culpa, I'm aware of this problem but failed to mention it in
my posting.  Still for simple documents this method will suffice.

> The only way that I know of to be sure that you have a final version
> is to compare the PostScript output file of two successive runs.  If
> they are equal, (I can't prove it but I'm pretty sure that) the
> document is final.  I occasionally do this myself, using "diff".

cmp(1) is better for it's less resource consuming.  diff(1) is
supposed to find diffrences while cmp(1) merely compares two files.
Something along the following lines would do.

  rm oldfile
  touch oldfile
  foreach time in first second third forth; do
    # run lout with output to newfile
    # cmp -s doesn't print anything, just compares and returns an exit code
    if cmp -s oldfile newfile; then  # two are identical
       rm oldfile
       break
    else
       mv newfile oldfile
    fi
  done

Unfortunately, this method requires that space be availbale for two
copies of postscript output.

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]