makefile: handle missing directory
This commit is contained in:
parent
1c3623d719
commit
fb0c08bb12
@ -1,5 +1,6 @@
|
|||||||
BIN = bin
|
BIN = bin
|
||||||
OBJ = obj
|
OBJ = obj
|
||||||
|
DIRS = $(BIN) $(OBJ)
|
||||||
CFLAGS = -g -O -W -Wall
|
CFLAGS = -g -O -W -Wall
|
||||||
|
|
||||||
BINS = $(addprefix $(BIN)/, unmunge munge repair)
|
BINS = $(addprefix $(BIN)/, unmunge munge repair)
|
||||||
@ -7,6 +8,8 @@ UNMUNGE_OBJS = $(addprefix $(OBJ)/, util.o unmunge.o)
|
|||||||
MUNGE_OBJS = $(addprefix $(OBJ)/, util.o munge.o)
|
MUNGE_OBJS = $(addprefix $(OBJ)/, util.o munge.o)
|
||||||
REPAIR_OBJS = $(addprefix $(OBJ)/, util.o heap.o mempool.o subst.o repair.o)
|
REPAIR_OBJS = $(addprefix $(OBJ)/, util.o heap.o mempool.o subst.o repair.o)
|
||||||
|
|
||||||
|
$(shell mkdir -p $(DIRS))
|
||||||
|
|
||||||
all: $(BINS)
|
all: $(BINS)
|
||||||
|
|
||||||
$(BIN)/unmunge: $(UNMUNGE_OBJS)
|
$(BIN)/unmunge: $(UNMUNGE_OBJS)
|
||||||
@ -25,4 +28,4 @@ clean:
|
|||||||
rm -f $(OBJ)/* $(BIN)/*.core
|
rm -f $(OBJ)/* $(BIN)/*.core
|
||||||
|
|
||||||
cleaner:
|
cleaner:
|
||||||
rm -f $(BIN)/* $(OBJ)/* $(BIN)/*.core
|
rm -rf $(DIRS)
|
||||||
|
Loading…
Reference in New Issue
Block a user