
# Various Makegen stuff that's common to all Makegens for the
# compiler.  The compiler is more complicated than a simple
# emit_library_rule because of the need for bootstrapping.

# Your normal compiler Makegen file should simply set $D2CFLAGS and
# $CPPFLAGS, then call this subroutine, and finally a emit_library_rule
#
sub d2c_library {
    local ($lidfile_name, $more_flags) = @_;
    local (@makefile_targets)
	= &emit_library_rule($lidfile_name, '$(BUILDROOT)/force.timestamp', 
			     $more_flags, '');
    if (!$enable_mindy_bootstrap) {
	push(@compile_dependencies, $makefile_targets[0]);
    } else {
	push(@compile_dependencies, $makefile_targets[1]);
	print <<"EOF";

d2c-compile: $makefile_targets[0]

EOF
    }
    return @makefile_targets;
}
