1
0
mirror of https://github.com/golang/go synced 2024-11-19 21:04:43 -07:00
go/src/pkg/runtime/mkversion.c
Russ Cox 55889409f8 runtime: separate out auto-generated files, take 2
This is like the ill-fated CL 5493063 except that
I have written a shell script (autogen.sh) instead of
thinking I could possibly write a correct Makefile.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5496075
2011-12-19 15:51:13 -05:00

22 lines
446 B
C

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
#include <u.h>
#include <libc.h>
char *template =
"// AUTO-GENERATED by autogen.sh; DO NOT EDIT\n\n"
"package runtime\n"
"const defaultGoroot = `%s`\n"
"const theVersion = \"%s\"\n";
void
main(void)
{
print(template, getgoroot(), getgoversion());
exits(0);
}