Conversation
lostsnow
reviewed
Apr 22, 2025
Makefile
Outdated
Comment on lines
+105
to
+111
| .PHONY: ungenerate | ||
| ungenerate: ### Build a binary for a raspberry pi zero 2w | ||
| @cp cmd/generate/_all-modules.go modules/all-modules.go | ||
|
|
||
| .PHONY: generate | ||
| generate: ### Build a binary for a raspberry pi zero 2w | ||
| @go generate |
Member
Author
There was a problem hiding this comment.
Fixed.
~/dev/GoMud % make help
Build Targets
build_rpi_zero2w: generate - Build a binary for a raspberry pi zero 2w
build_win64: generate - Build a binary for 64bit windows
build_linux64: generate - Build a binary for linux
build: validate build_local - Validate the code and build the binary.
ungenerate: - Reverts to a clean version of modules/all-modules.go
generate: - Generates include directives for modules
Run Targets
run: - Build and run server.
client: - Build and run client terminal client
Help
help: - List makefile targets.
Member
|
LGTM |
…h error when go generate hasn't been run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This reorganizes modules into their own packages/folders. Modules have been included in a single folder to allow them to be "automatically" compiled into the final binary thanks to a single include in
main.go:_ "github.com/GoMudEngine/GoMud/modules"However, the result is a cluttered folder containing all sorts of files or folders for various modules.
This change fixes 2 issues:
Concerns
go generateis run before the build. This can be automated for those that use amakecommand, but for anyone on windows or unfamiliar withmake, it needs to be explicitly called out to rungo generatefirst.Changes
filesfolder name within their own folder.cmd/generate/module-imports.go- this is only intended to be invoked viago generate, which handles the following compiler directive inmain.go://go:generate go run cmd/generate/module-imports.gomodulesfolder off of the repo root and writes all folder names into theall-modules.goinclude, thereby forcing all modules to be included.Example
Screenshot of output:
