Philio / GoMySQL

The most complete and stable MySQL client library written completely in Go. For discussion, ideas, suggestions, feature requests etc, please visit the GoMySQL Google Group (link below). For any issues/bugs or need some help, please post an issue on Github.
https://groups.google.com/group/gomysql
Other
189 stars 37 forks source link

Makefile cleanup #42

Closed edsrzf closed 13 years ago

Philio commented 13 years ago

I'll leave this open but not pull it at the moment, as all my testing scripts use "mysql" target. Ideally it needs to support both, if that's possible.

Be nice to be able to do...

goinstall github.com/etc

OR

make install to install as "mysql" package

It used to work, but according to a recent issue posted it doesn't any more

edsrzf commented 13 years ago

I'm not sure what used to work. The problem is that goinstall will install the package to a different place than make install. It doesn't pay attention to the Makefile's TARGET.

This means that people who build from the Makefile won't be able to build other third party packages that depend on this one. At least they won't without copying the files to a different location or goinstalling.

Philio commented 13 years ago

What I'd like to do is...

goinstall github.com/Philio/MySQL installs to target "github.com/Philio/MySQL" make install installs to tartget "mysql" (or maybe "make mysql" as an alternative)

This way we get the best of both worlds, I have a lot of production scripts relying on "mysql" target so I don't want to loose this functionality.

edsrzf commented 13 years ago

Okay, I believe that's what happens right now. My preference would be to have it always install to the same place, but I suppose it's up to you.

Philio commented 13 years ago

I think it does as far as the install go but building new releases apparently causes issues : https://github.com/Philio/GoMySQL/issues#issue/40

edsrzf commented 13 years ago

Building the Go tree wipes out everything under pkg/$GOOS_$GOARCH where package binaries live. It's been this forever.

If the package was goinstalled, the solution is to run goinstall -a after building a Go release. This will reinstall and recompile all previously goinstalled packages. (I thought maybe the build did this automatically, but I can't find where it does.)

If the package was installed via make install, then there's no choice but to install again via make install.

I don't believe there's any way for the MySQL package to completely solve issue 40 because it's more of a Go build issue.

Philio commented 13 years ago

Ah right, I tend to make install the packages I use after an update out of habit anyway so that's probably why I never have an issue with this personally.

Unless it actually does fix anything to change the target I don't think there is much point. I've got at least a couple of servers with 2 or 3 release back versions of Go on so I'll use them to double check if there is any difference.

edsrzf commented 13 years ago

This's been dead for long enough.