File tree Expand file tree Collapse file tree
unordered_multimap/nested
unordered_multiset/nested Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,11 +3,21 @@ 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 ) /
13+ export DICT_DIR
14+
615.PHONY : all
716all :
817 $(MAKE ) dict
918 $(MAKE ) write
1019 $(MAKE ) read
20+ $(MAKE ) store
1121
1222# This assumes there is no whitespace in any of the paths...
1323DICT_MAKEFILE_DIR := $(sort $(shell find * / -name Makefile -printf "% h\n") )
@@ -16,15 +26,23 @@ READ_C := $(sort $(shell find . -name read.C))
1626
1727.PHONY : dict
1828dict :: $(DICT_MAKEFILE_DIR )
19- $(DICT_MAKEFILE_DIR ) ::
29+ $(DICT_MAKEFILE_DIR ) :: $( DICT_DIR )
2030 @$(MAKE ) -C $@
31+ $(DICT_DIR ) ::
32+ @mkdir -p $@
33+ $(info Storing dictionaries in: '$@ ')
2134
2235.PHONY : write
2336write :: $(WRITE_C )
2437$(WRITE_C ) ::
25- @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( shell dirname $@ ) " $(ROOT_EXE ) -q -l $@
38+ @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( or $( DICT_DIR ) , $( shell dirname $@ ) ) " $(ROOT_EXE ) -q -l $@
2639
2740.PHONY : read
2841read :: $(READ_C )
2942$(READ_C ) ::
30- @LD_LIBRARY_PATH=" $$ {LD_LIBRARY_PATH:+$$ LD_LIBRARY_PATH:}$( shell dirname $@ ) " $(ROOT_EXE ) -q -l $@
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)
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedMap.so
17+ all : $( DICT_DIR ) libNestedMap.so
1818
19- NestedMap.cxx : NestedMap.hxx LinkDef.h
20- $(ROOTCLING ) -f $@ $^
19+ $( DICT_DIR ) NestedMap.cxx : NestedMap.hxx LinkDef.h
20+ $(ROOTCLING ) -f $@ $^
2121
22- libNestedMap.so : NestedMap.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedMap.so : $( DICT_DIR ) NestedMap.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedMap.cxx NestedMap_rdict.pcm libNestedMap.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedMultimap.so
17+ all : $( DICT_DIR ) libNestedMultimap.so
1818
19- NestedMultimap.cxx : NestedMultimap.hxx LinkDef.h
19+ $( DICT_DIR ) NestedMultimap.cxx : NestedMultimap.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedMultimap.so : NestedMultimap.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedMultimap.so : $( DICT_DIR ) NestedMultimap.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedMultimap.cxx NestedMultimap_rdict.pcm libNestedMultimap.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedMultiset.so
17+ all : $( DICT_DIR ) libNestedMultiset.so
1818
19- NestedMultiset.cxx : NestedMultiset.hxx LinkDef.h
19+ $( DICT_DIR ) NestedMultiset.cxx : NestedMultiset.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedMultiset.so : NestedMultiset.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedMultiset.so : $( DICT_DIR ) NestedMultiset.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedMultiset.cxx NestedMultiset_rdict.pcm libNestedMultiset.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedSet.so
17+ all : $( DICT_DIR ) libNestedSet.so
1818
19- NestedSet.cxx : NestedSet.hxx LinkDef.h
19+ $( DICT_DIR ) NestedSet.cxx : NestedSet.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedSet.so : NestedSet.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedSet.so : $( DICT_DIR ) NestedSet.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedSet.cxx NestedSet_rdict.pcm libNestedSet.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedUnorderedMap.so
17+ all : $( DICT_DIR ) libNestedUnorderedMap.so
1818
19- NestedUnorderedMap.cxx : NestedUnorderedMap.hxx LinkDef.h
19+ $( DICT_DIR ) NestedUnorderedMap.cxx : NestedUnorderedMap.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedUnorderedMap.so : NestedUnorderedMap.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedUnorderedMap.so : $( DICT_DIR ) NestedUnorderedMap.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedUnorderedMap.cxx NestedUnorderedMap_rdict.pcm libNestedUnorderedMap.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedUnorderedMultimap.so
17+ all : $( DICT_DIR ) libNestedUnorderedMultimap.so
1818
19- NestedUnorderedMultimap.cxx : NestedUnorderedMultimap.hxx LinkDef.h
19+ $( DICT_DIR ) NestedUnorderedMultimap.cxx : NestedUnorderedMultimap.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedUnorderedMultimap.so : NestedUnorderedMultimap.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedUnorderedMultimap.so : $( DICT_DIR ) NestedUnorderedMultimap.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedUnorderedMultimap.cxx NestedUnorderedMultimap_rdict.pcm libNestedUnorderedMultimap.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedUnorderedMultiset.so
17+ all : $( DICT_DIR ) libNestedUnorderedMultiset.so
1818
19- NestedUnorderedMultiset.cxx : NestedUnorderedMultiset.hxx LinkDef.h
19+ $( DICT_DIR ) NestedUnorderedMultiset.cxx : NestedUnorderedMultiset.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedUnorderedMultiset.so : NestedUnorderedMultiset.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedUnorderedMultiset.so : $( DICT_DIR ) NestedUnorderedMultiset.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedUnorderedMultiset.cxx NestedUnorderedMultiset_rdict.pcm libNestedUnorderedMultiset.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libNestedUnorderedSet.so
17+ all : $( DICT_DIR ) libNestedUnorderedSet.so
1818
19- NestedUnorderedSet.cxx : NestedUnorderedSet.hxx LinkDef.h
19+ $( DICT_DIR ) NestedUnorderedSet.cxx : NestedUnorderedSet.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libNestedUnorderedSet.so : NestedUnorderedSet.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libNestedUnorderedSet.so : $( DICT_DIR ) NestedUnorderedSet.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) NestedUnorderedSet.cxx NestedUnorderedSet_rdict.pcm libNestedUnorderedSet.so
Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414
1515.PHONY : all clean
1616
17- all : libUserClass.so
17+ all : $( DICT_DIR ) libUserClass.so
1818
19- UserClass.cxx : UserClass.hxx LinkDef.h
19+ $( DICT_DIR ) UserClass.cxx : UserClass.hxx LinkDef.h
2020 $(ROOTCLING ) -f $@ $^
2121
22- libUserClass.so : UserClass.cxx
23- $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS )
22+ $( DICT_DIR ) libUserClass.so : $( DICT_DIR ) UserClass.cxx
23+ $(CXX ) -shared -fPIC -o $@ $^ $(CXXFLAGS ) $(LDFLAGS ) -I $$( pwd )
2424
2525clean :
2626 $(RM ) UserClass.cxx UserClass_rdict.pcm libUserClass.so
You can’t perform that action at this time.
0 commit comments