0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Makefile: データ変換

Posted at

次のようなスクリプトを使う Makefile です。

./convert_json.sh 豊田小_2024-06-18

入力データ

../spread_to_json/data/豊田小_2024-06-18.json

出力データ

./data/豊田小_2024-06-18_hh.json
Makefile
SRC_DIR := ../spread_to_json/data
DST_DIR := ../data
DST_JSON := $(wildcard $(DST_DIR)/*_hh.json)
#
all: $(DST_JSON)

$(DST_DIR)/%_hh.json: $(SRC_DIR)/%.json
	@echo "Converting $< to $@"
	echo $*
	./convert_json.sh $*

実行方法

make

../spread_to_json/data にある JSON が、
../data にある対応するデータより新しい時は、
変換スクリプトが実行されます。

新しいものがない時は、次のようになります。

$ make
make: 'all' に対して行うべき事はありません.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?