Gomake

147 views
Skip to first unread message

Jan Hosang

unread,
Dec 15, 2009, 3:27:51 AM12/15/09
to golang-nuts
Hi all!

Go is very explicit about packages and dependencies. The Makefiles
shipped with the go packages look clean but are also very explicit.
And at least for newbies it hard to get a makefile system properly set
up.

So I started working on gomake, which scans for gofiles, analyzes
their dependency and package structure and builds them, so it is
possible to build projects which are structured in a standard way
without makefiles and just with a single command. Since this doesn't
seem to be done yet, I start this discussion. Is what I want to do
obviously impossible or just stupid and useless? Is this approach
undesirable because it doesn't scale, do you think I can get it to
scale with cache files? What are your thoughts?

Thanks for any advice. Cheers,
Jan

Dimiter "malkia" Stanev

unread,
Dec 15, 2009, 4:18:00 AM12/15/09
to golang-nuts
Check these sites here:

http://go-lang.cat-v.org/dev-utils
http://www.manatlan.com/page/gg

and I have a small project, with goals to automatically create a
makefile:

http://github.com/malkia/go-runner

There were other such tools mentioned here. The good news is that Go
provides the parser library as part of the runtime, and that makes the
things real easy :)

manatlan

unread,
Dec 15, 2009, 4:28:48 AM12/15/09
to golang-nuts
I'm working on the same approach, as on option of gg (http://
www.manatlan.com/blog/the_0_5_release_of_gg_is_out) ...
(it's working since some days, but never take the time to release it)

But, instead of creating real makefine, it produce "gg makefile" (kind
of yaml description) : easy to read, easy to produce
Mine use ast/token to evaluate/guess dependancies, build order ...

ShadowIce

unread,
Dec 15, 2009, 10:15:09 AM12/15/09
to golang-nuts
I have started working on something similar a week ago that I'm
probably going to release by next week. It's pretty simple to
implement and there are several other implementations already out
there (also another thread here:
http://groups.google.com/group/golang-nuts/browse_thread/thread/2ba8c4972dd2d20d/c6d353d68fd53442)

I've done it mostly to learn the language and because I couldn't write
a working Makefile for another program I was working on within half an
hour. I don't want to spend time working on things that should be
trivial when I could code instead. So IMHO it's really an important
improvement to have such tools, even if they won't be good for larger
projects.


On Dec 15, 9:27 am, Jan Hosang <jan.hos...@gmail.com> wrote:

Jan Hosang

unread,
Dec 18, 2009, 6:11:04 AM12/18/09
to golang-nuts
I put my code online since it does reasonable work when being used on
itself, but it does not work on the go library yet. Please have a look
at it and try it!

http://code.google.com/p/gomake/

As long as you only want to build on binary and source files of one
package are not scattered over different directories it should work.

Has anybody thought about circular dependencies? I guess it's not
possible to build packages with circular dependencies...

Cheers,
Jan

Jan Hosang

unread,
Dec 19, 2009, 7:41:53 AM12/19/09
to golang-nuts
Oops, I noticed go already ships some binary called gomake, which
seems to use makefiles. I guess I better rename my project?

Devon H. O'Dell

unread,
Dec 19, 2009, 10:10:10 AM12/19/09
to Jan Hosang, golang-nuts
2009/12/19 Jan Hosang <jan.h...@gmail.com>:

> Oops, I noticed go already ships some binary called gomake, which
> seems to use makefiles. I guess I better rename my project?

No. I made gomake just because gmake != make everywhere. If something
else builds the source tree, it can be named whatever.

As an aside, I'm working on a similar project. Perhaps we should collaborate :)

--dho

Reply all
Reply to author
Forward
0 new messages