Skip to content

Commit 4698ea0

Browse files
Adjusted DICT_DIR, WRITE_DIR and READ_DIR to always end with '/', so that inner Makefiles can be run individually
1 parent bba1c90 commit 4698ea0

11 files changed

Lines changed: 35 additions & 36 deletions

File tree

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ $(error Could not find root.exe)
44
endif
55

66
# directory arguments can be empty -> no sudirectories will be created, everything will be stored directly in those folders
7-
DICT_DIR := $(shell pwd)/dict/$(dict_dir)
8-
WRITE_DIR := $(shell pwd)/write/$(write_dir)
9-
READ_DIR := $(shell pwd)/read/$(write_dir)/$(read_dir)
10-
BASE_DIR := $(shell pwd)
7+
DICT_DIR := $(shell pwd)/dict/$(if $(dict_dir),$(dict_dir)/)
8+
WRITE_DIR := $(shell pwd)/write/$(if $(write_dir),$(write_dir)/)
9+
READ_DIR := $(shell pwd)/read/$(if $(write_dir),$(write_dir)/)$(if $(read_dir),$(read_dir)/)
1110
export DICT_DIR
1211

1312
.PHONY: all
@@ -32,7 +31,7 @@ $(DICT_DIR)::
3231
.PHONY: write
3332
write:: $(WRITE_C)
3433
$(WRITE_C):: $(WRITE_DIR)
35-
@LD_LIBRARY_PATH="$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(DICT_DIR)" $(ROOT_EXE) -q -l '$@("$(WRITE_DIR)/$(subst /,.,$(shell dirname $@)).root")'
34+
@LD_LIBRARY_PATH="$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(DICT_DIR)" $(ROOT_EXE) -q -l '$@("$(WRITE_DIR)$(subst /,.,$(shell dirname $@)).root")'
3635
$(WRITE_DIR)::
3736
@mkdir -p $@
3837
$(info Storing root files in: '$@')
@@ -41,7 +40,7 @@ $(WRITE_DIR)::
4140
read:: $(READ_C)
4241
$(READ_C):: $(READ_DIR)
4342
@LD_LIBRARY_PATH="$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}$(DICT_DIR)" $(ROOT_EXE) -q -l \
44-
'$@("$(WRITE_DIR)/$(subst /,.,$(shell dirname $@)).root", "$(READ_DIR)/$(subst /,.,$(shell dirname $@)).json")'
43+
'$@("$(WRITE_DIR)/$(subst /,.,$(shell dirname $@)).root", "$(READ_DIR)$(subst /,.,$(shell dirname $@)).json")'
4544
$(READ_DIR)::
4645
@mkdir -p $@
4746
$(info Storing root files in: '$@')

types/map/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedMap.so
17+
all: $(DICT_DIR)libNestedMap.so
1818

19-
$(DICT_DIR)/NestedMap.cxx: NestedMap.hxx LinkDef.h
19+
$(DICT_DIR)NestedMap.cxx: NestedMap.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedMap.so: $(DICT_DIR)/NestedMap.cxx
22+
$(DICT_DIR)libNestedMap.so: $(DICT_DIR)NestedMap.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/multimap/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedMultimap.so
17+
all: $(DICT_DIR)libNestedMultimap.so
1818

19-
$(DICT_DIR)/NestedMultimap.cxx: NestedMultimap.hxx LinkDef.h
19+
$(DICT_DIR)NestedMultimap.cxx: NestedMultimap.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedMultimap.so: $(DICT_DIR)/NestedMultimap.cxx
22+
$(DICT_DIR)libNestedMultimap.so: $(DICT_DIR)NestedMultimap.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/multiset/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedMultiset.so
17+
all: $(DICT_DIR)libNestedMultiset.so
1818

19-
$(DICT_DIR)/NestedMultiset.cxx: NestedMultiset.hxx LinkDef.h
19+
$(DICT_DIR)NestedMultiset.cxx: NestedMultiset.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedMultiset.so: $(DICT_DIR)/NestedMultiset.cxx
22+
$(DICT_DIR)libNestedMultiset.so: $(DICT_DIR)NestedMultiset.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/set/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedSet.so
17+
all: $(DICT_DIR)libNestedSet.so
1818

19-
$(DICT_DIR)/NestedSet.cxx: NestedSet.hxx LinkDef.h
19+
$(DICT_DIR)NestedSet.cxx: NestedSet.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedSet.so: $(DICT_DIR)/NestedSet.cxx
22+
$(DICT_DIR)libNestedSet.so: $(DICT_DIR)NestedSet.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/unordered_map/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedUnorderedMap.so
17+
all: $(DICT_DIR)libNestedUnorderedMap.so
1818

19-
$(DICT_DIR)/NestedUnorderedMap.cxx: NestedUnorderedMap.hxx LinkDef.h
19+
$(DICT_DIR)NestedUnorderedMap.cxx: NestedUnorderedMap.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedUnorderedMap.so: $(DICT_DIR)/NestedUnorderedMap.cxx
22+
$(DICT_DIR)libNestedUnorderedMap.so: $(DICT_DIR)NestedUnorderedMap.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/unordered_multimap/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedUnorderedMultimap.so
17+
all: $(DICT_DIR)libNestedUnorderedMultimap.so
1818

19-
$(DICT_DIR)/NestedUnorderedMultimap.cxx: NestedUnorderedMultimap.hxx LinkDef.h
19+
$(DICT_DIR)NestedUnorderedMultimap.cxx: NestedUnorderedMultimap.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedUnorderedMultimap.so: $(DICT_DIR)/NestedUnorderedMultimap.cxx
22+
$(DICT_DIR)libNestedUnorderedMultimap.so: $(DICT_DIR)NestedUnorderedMultimap.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/unordered_multiset/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedUnorderedMultiset.so
17+
all: $(DICT_DIR)libNestedUnorderedMultiset.so
1818

19-
$(DICT_DIR)/NestedUnorderedMultiset.cxx: NestedUnorderedMultiset.hxx LinkDef.h
19+
$(DICT_DIR)NestedUnorderedMultiset.cxx: NestedUnorderedMultiset.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedUnorderedMultiset.so: $(DICT_DIR)/NestedUnorderedMultiset.cxx
22+
$(DICT_DIR)libNestedUnorderedMultiset.so: $(DICT_DIR)NestedUnorderedMultiset.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/unordered_set/nested/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libNestedUnorderedSet.so
17+
all: $(DICT_DIR)libNestedUnorderedSet.so
1818

19-
$(DICT_DIR)/NestedUnorderedSet.cxx: NestedUnorderedSet.hxx LinkDef.h
19+
$(DICT_DIR)NestedUnorderedSet.cxx: NestedUnorderedSet.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libNestedUnorderedSet.so: $(DICT_DIR)/NestedUnorderedSet.cxx
22+
$(DICT_DIR)libNestedUnorderedSet.so: $(DICT_DIR)NestedUnorderedSet.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

types/user/class/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1414

1515
.PHONY: all clean
1616

17-
all: $(DICT_DIR)/libUserClass.so
17+
all: $(DICT_DIR)libUserClass.so
1818

19-
$(DICT_DIR)/UserClass.cxx: UserClass.hxx LinkDef.h
19+
$(DICT_DIR)UserClass.cxx: UserClass.hxx LinkDef.h
2020
$(ROOTCLING) -f $@ $^
2121

22-
$(DICT_DIR)/libUserClass.so: $(DICT_DIR)/UserClass.cxx
22+
$(DICT_DIR)libUserClass.so: $(DICT_DIR)UserClass.cxx
2323
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I .
2424

2525
clean:

0 commit comments

Comments
 (0)