+2019-04-16 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * Make-lang.in (d.mostyclean): Clean idgen and impcvgen.
+ (d/idgen): Rename to d/idgen$(build_exeext), add BUILD_LIBDEPS.
+ (d/impcvgen): Rename to d/impcvgen$(build_exeext), add BUILD_LIBDEPS.
+ (d/id.c): Call idgen$(build_exeext).
+ (d/impcnvtab.c): Call impcvgen$(build_exeext).
+
2019-04-14 Johannes Pfau <johannespfau@gmail.com>
PR d/87799
* d-system.h (_mkdir): Forward _mkdir on MinGW to mkdir in system.h.
-rm -f d/*$(objext)
-rm -f d/*$(coverageexts)
-rm -f $(D_GENERATED_SRCS)
- -rm -f d/gdc$(exeext) gdc-cross$(exeext) d/d21$(exeext)
+ -rm -f d/idgen$(build_exeext) d/impcnvgen$(build_exeext)
+ -rm -f gdc$(exeext) gdc-cross$(exeext) d21$(exeext)
d.clean:
d.distclean:
d.maintainer-clean:
$(POSTCOMPILE)
# Generated programs.
-d/idgen: d/idgen.dmdgen.o
- +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ $^
+d/idgen$(build_exeext): d/idgen.dmdgen.o $(BUILD_LIBDEPS)
+ +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
+ $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
-d/impcvgen: d/impcnvgen.dmdgen.o
- +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ $^
+d/impcnvgen$(build_exeext): d/impcnvgen.dmdgen.o $(BUILD_LIBDEPS)
+ +$(LINKER_FOR_BUILD) $(BUILD_LINKERFLAGS) $(BUILD_LDFLAGS) -o $@ \
+ $(filter-out $(BUILD_LIBDEPS), $^) $(BUILD_LIBS)
# Generated sources.
-d/id.c: d/idgen
- cd d && ./idgen
+d/id.c: d/idgen$(build_exeext)
+ cd d && ./idgen$(build_exeext)
# idgen also generates id.h; just verify it exists.
d/id.h: d/id.c
-d/impcnvtab.c: d/impcvgen
- cd d && ./impcvgen
+d/impcnvtab.c: d/impcnvgen$(build_exeext)
+ cd d && ./impcnvgen$(build_exeext)
d/%.dmdgen.o: $(srcdir)/d/dmd/%.c
$(DMDGEN_COMPILE) $(D_INCLUDES) $<