Hi Nobu,

The win32\ifchange.bat script doesn't perform well on 98se.
Of course, the build process continues but with just a few
extra, unnecessary file copies.
Your checks & warnings in the file make it clear that there
were problems getting DOS shell to do something which *should*
have been quite simple.

I did some web-research to see how others had approached the
problem and hacked this, which might be better ...


======================================================================
@echo off
:: ----------------------------------
::  usage: ifchange target temporary
:: ----------------------------------
:: If contents of target(arg1) and temporary(arg2) files match,
::   delete arg2 file
:: Otherwise, create or update target from arg2.
::
:: This batch expected to work for MS-DOS 2.0 and later (all Windows)
:: N.B. - errorlevel not used - unavailable from fc/find before DOS 6

:: Create target if missing -
if not exist %1 goto update

:: - or replace target if temporary file differs
:: [ compare, then find "***" (diff highlights from fc output) ]
fc.exe /L /LB1 %1 %2 | find.exe "***" > rb_fcf.tmp

:: Ensure that "NZ flag" is cleared
if exist rb_fcNZ.tmp  del rb_fcNZ.tmp

:: Dummy copy of fc/find temp -
:: - if zero-length, fc/find temp will not be copied (DOS 'feature')
copy rb_fcf.tmp  rb_fcNZ.tmp > nul
del  rb_fcf.tmp

:: arg files match  -- no update needed
if not exist rb_fcNZ.tmp goto unchanged

:: arg files differ -- delete "NZ flag", then update target
del rb_fcNZ.tmp > nul

:update
echo %1 updated
if exist %1 del %1
copy %2 %1 > nul
goto end

:unchanged
echo %1 unchanged
del %2

:end
======================================================================

I just need to work out why it's needed.
I guess it's because it's not possible to have a temporary as a
dependent file in a rule ?
I'll ask when I *really* need to know ;-)


Thanks,

daz