@@ -3,21 +3,17 @@ ifeq ($(ROOT_EXE),)
33$(error Could not find root.exe)
44endif
55
6- define move_files
7- mkdir -p $(1 ) _files && \
8- find . -name "*.$(1 ) " -not -path "./$(1 ) _files/*" -exec mv {} "$(1 ) _files" \;
9- endef
10-
11- ver :=
12- DICT_DIR := $(shell pwd) /dict/$(ver ) /
6+ DICT_DIR := $(shell pwd) /dict/$(dict_dir )
7+ WRITE_DIR := $(shell pwd) /write/$(write_dir )
8+ READ_DIR := $(shell pwd) /read/$(write_dir ) /$(read_dir )
9+ BASE_DIR := $(shell pwd)
1310export DICT_DIR
1411
1512.PHONY : all
1613all :
1714 $(MAKE ) dict
1815 $(MAKE ) write
1916 $(MAKE ) read
20- $(MAKE ) store
2117
2218# This assumes there is no whitespace in any of the paths...
2319DICT_MAKEFILE_DIR := $(sort $(shell find * / -name Makefile -printf "% h\n") )
@@ -34,15 +30,17 @@ $(DICT_DIR)::
3430
3531.PHONY : write
3632write :: $(WRITE_C )
37- $(WRITE_C ) ::
38- @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( or $( DICT_DIR) ,$( shell dirname $@ ) ) " $(ROOT_EXE ) -q -l $@
33+ $(WRITE_C ) :: $(WRITE_DIR )
34+ @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( DICT_DIR) " $(ROOT_EXE ) -q -l ' $@("$(WRITE_DIR)/$(subst /,.,$(shell dirname $@)).root")'
35+ $(WRITE_DIR ) ::
36+ @mkdir -p $@
37+ $(info Storing root files in: '$@ ')
3938
4039.PHONY : read
4140read :: $(READ_C )
42- $(READ_C ) ::
43- @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( or $( DICT_DIR) ,$( shell dirname $@ ) ) " $(ROOT_EXE ) -q -l $@
44-
45- .PHONY : store
46- store :
47- @$(call move_files,root)
48- @$(call move_files,json)
41+ $(READ_C ) :: $(READ_DIR )
42+ @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( DICT_DIR) " $(ROOT_EXE ) -q -l \
43+ ' $@("$(WRITE_DIR)/$(subst /,.,$(shell dirname $@)).root", "$(READ_DIR)/$(subst /,.,$(shell dirname $@)).json")'
44+ $(READ_DIR ) ::
45+ @mkdir -p $@
46+ $(info Storing root files in: '$@ ')
0 commit comments