[Issue 13517] Only touch .di generated file if changed
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Sep 22 21:44:46 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13517
--- Comment #28 from hsteoh at quickfur.ath.cx ---
Relying solely on timestamp to detect change is an antiquated concept that
basically only make (and misguided attempts to build on it) suffers from.
Modern build systems do not have this problem.
But given that it's not an ideal world (otherwise we wouldn't need to interface
with C++ to begin with :-P) one possible workaround is to write your compile
rules something along these lines:
sucky.o sucky.di: sucky.d
$(DMD) $(DFLAGS) sucky.d -ofsucky.o -H -Hfsucky_new.di
cmp sucky.di sucky_new.di ; if [ $? -ne 0 ] ; then cp sucky_new.di sucky.di
; fi
--
More information about the Digitalmars-d-bugs
mailing list