Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

makefile - GNU Make: "pipe: No such file or directory" error

I'm trying to create a Makefile that works on both Windows and Linux. Running make clean generates the following error:

process_begin: CreateProcess(NULL, rmdir /s /q D:DocumentsProgrammingprojectin, ...) failed.
make: Makefile:13: pipe: No such file or directory
process_begin: CreateProcess(NULL, rmdir /s /q D:DocumentsProgrammingprojectobj, ...) failed.
make: Makefile:15: pipe: No such file or directory

The relevant parts of the Makefile are:

BIN_DIR=bin
OBJ_DIR=obj
SRC_DIR=src

ifeq ($(OS),Windows_NT)
    RMDIR=$(shell rmdir /s /q $(subst /,,$(abspath $1)))
else
    RMDIR=$(shell rm -rf $(abspath $1))
endif

clean:
    @echo "RM $(BIN_DIR)"
    @$(call RMDIR,$(BIN_DIR))
    @echo "RM $(OBJ_DIR)"
    @$(call RMDIR,$(OBJ_DIR))
    @echo "Done!"

.PHONY: clean

The project structure looks like this:

├─bin
├─obj
├─src
└─Makefile
question from:https://stackoverflow.com/questions/65865637/gnu-make-pipe-no-such-file-or-directory-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...