-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (25 loc) · 716 Bytes
/
Makefile
File metadata and controls
39 lines (25 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Makefile for fsck (convert source code from UTF-8 to Shift_JIS)
# Do not use non-ASCII characters in this file.
MKDIR_P = mkdir -p
U8TOSJ = u8tosj
SRCDIR_MK = srcdir.mk
SRC_DIR = src
-include $(SRCDIR_MK)
BLD_DIR = build
SRCS = $(wildcard $(SRC_DIR)/*)
SJ_SRCS = $(subst $(SRC_DIR)/,$(BLD_DIR)/,$(SRCS))
.PHONY: all clean
all: directories $(SJ_SRCS)
directories: $(BLD_DIR)
# Do not use $(SRCDIR_MK) as the target name to prevent automatic remaking of the makefile.
srcdir_mk:
rm -f $(SRCDIR_MK)
echo "SRC_DIR = $(CURDIR)/src" > $(SRCDIR_MK)
$(BLD_DIR):
$(MKDIR_P) $@
# convert src/* (UTF-8) to build/* (Shift_JIS)
$(BLD_DIR)/%: $(SRC_DIR)/%
$(U8TOSJ) < $^ >! $@
clean:
rm -f $(SJ_SRCS)
# EOF