Skip to content

No need for mkdir -p -$(CARGO_TARGET_DIR) in Makefile #1333

@dilyanpalauzov

Description

@dilyanpalauzov

In Makefile the target $(CARGO_TARGET_DIR): mkdir -p $@ is not necessary. With this change:

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -49,11 +49,8 @@ bin:
        mkdir -p $@
 
-$(CARGO_TARGET_DIR):
-       mkdir -p $@
-
 .PHONY: build
 build: bin/netavark
 
-bin/netavark: $(SOURCES) bin $(CARGO_TARGET_DIR)
+bin/netavark: $(SOURCES) bin
        $(CARGO) build $(release)
        cp $(CARGO_TARGET_DIR)/$(profile)/netavark bin/netavark

CARGO_TARGET_DIR=abc make, make CARGO_TARGET_DIR=def and make do create the target directory as expected using cargo 1.89.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions