Skip to content

Commit

Permalink
fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mkideal committed Oct 13, 2024
1 parent bf4af34 commit 231426c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ example/clean:
example/gen:
@echo "Running generate example..."
@NEXT_NOCOPYBUILTIN=1 ${BUILD_BIN_DIR}/next build ${EXAMPLE_DIR}
@if [ -d ${EXAMPLE_DIR}/gen/rust ]; then cd ${EXAMPLE_DIR}/gen/rust && cargo init --vcs none -q; fi

.PHONY: clean
clean:
Expand Down
8 changes: 4 additions & 4 deletions src/compile/next.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ var commands = map[string]*command{
// **.nextproj** is recommended for the Next project file.
// :::
"build": newCommand(
"Run a next project: next build [file_or_dirs...]",
"Build a next project: next build [file_or_dirs...]",
func(ctx *commandContext, args []string) error {
if len(args) == 1 {
args = append(args, ".")
Expand Down Expand Up @@ -262,7 +262,7 @@ func Compile(platform Platform, builtin FileSystem, args []string) {
}
}

flagSet := flag.NewFlagSet(args[0], flag.ContinueOnError)
flagSet := flag.NewFlagSet(op.If(runtime.GOOS == "windows", "next", args[0]), flag.ContinueOnError)
flagSet.Usage = func() {}

stdin, stderr := platform.Stdin(), platform.Stderr()
Expand All @@ -273,12 +273,12 @@ func Compile(platform Platform, builtin FileSystem, args []string) {
flagSet.SetOutput(term.ColorizeWriter(stderr, term.Red))
usageFunc := func() {
flagSet.SetOutput(stderr)
name := term.Bold.Colorize(op.If(runtime.GOOS == "windows", "next", args[0]))
name := term.Bold.Colorize(flagSet.Name())
term.Fprint(flagSet.Output(), "Next is an IDL for generating customized code across multiple languages.\n\n")
term.Fprint(flagSet.Output(), "Usage:\n")
term.Fprintf(flagSet.Output(), " %s [Options] [source_dirs_or_files...] (default: current directory)\n", name)
term.Fprintf(flagSet.Output(), " %s [Options] <stdin>\n", name)
term.Fprintf(flagSet.Output(), " %s <Command> [Command-Args]\n", name)
term.Fprintf(flagSet.Output(), " %s <Command> ...\n", name)
term.Fprintf(flagSet.Output(), "\nCommands:\n")

var maxCommandLength int
Expand Down
8 changes: 0 additions & 8 deletions website/example/gen/rust/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions website/example/gen/rust/src/main.rs

This file was deleted.

0 comments on commit 231426c

Please sign in to comment.