Skip to content

Commit 79671c3

Browse files
Storing all generated files in a specified folder
1 parent 4d3e58f commit 79671c3

11 files changed

Lines changed: 35 additions & 57 deletions

File tree

Makefile

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ define move_files
88
find . -name "*.$(1)" -not -path "./$(1)_files/*" -exec mv {} "$(1)_files" \;
99
endef
1010

11-
dict_dir :=
11+
ver :=
12+
DICT_DIR := $(shell pwd)/dict/$(ver)/
13+
export DICT_DIR
1214

1315
.PHONY: all
1416
all:
@@ -24,25 +26,11 @@ READ_C := $(sort $(shell find . -name read.C))
2426

2527
.PHONY: dict
2628
dict:: $(DICT_MAKEFILE_DIR)
27-
28-
ifeq ($(dict_dir), )
29-
DICT_DIR := ""
30-
export DICT_DIR
31-
$(warning No directory for dictionaries defined (use 'dict_dir' flag).)
32-
33-
$(DICT_MAKEFILE_DIR)::
34-
@$(MAKE) -C $@
35-
36-
else
37-
DICT_DIR := $(shell pwd)/$(dict_dir)/
38-
export DICT_DIR
39-
4029
$(DICT_MAKEFILE_DIR):: $(DICT_DIR)
4130
@$(MAKE) -C $@
4231
$(DICT_DIR)::
43-
$(shell mkdir -p $@)
32+
@mkdir -p $@
4433
$(info Storing dictionaries in: '$@')
45-
endif
4634

4735
.PHONY: write
4836
write:: $(WRITE_C)

types/map/nested/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ LDFLAGS := $(shell $(ROOT_CONFIG) --libs)
1616

1717
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-
$(DICT_DIR)libNestedMap.so: NestedMap.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedMap_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedMap.so: $(DICT_DIR)NestedMap.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedMap.cxx NestedMap_rdict.pcm libNestedMap.so

types/multimap/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedMultimap.so: NestedMultimap.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedMultimap_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedMultimap.so: $(DICT_DIR)NestedMultimap.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedMultimap.cxx NestedMultimap_rdict.pcm libNestedMultimap.so

types/multiset/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedMultiset.so: NestedMultiset.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedMultiset_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedMultiset.so: $(DICT_DIR)NestedMultiset.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedMultiset.cxx NestedMultiset_rdict.pcm libNestedMultiset.so

types/set/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedSet.so: NestedSet.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedSet_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedSet.so: $(DICT_DIR)NestedSet.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedSet.cxx NestedSet_rdict.pcm libNestedSet.so

types/unordered_map/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedUnorderedMap.so: NestedUnorderedMap.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedUnorderedMap_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedUnorderedMap.so: $(DICT_DIR)NestedUnorderedMap.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedUnorderedMap.cxx NestedUnorderedMap_rdict.pcm libNestedUnorderedMap.so

types/unordered_multimap/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedUnorderedMultimap.so: NestedUnorderedMultimap.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedUnorderedMultimap_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedUnorderedMultimap.so: $(DICT_DIR)NestedUnorderedMultimap.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedUnorderedMultimap.cxx NestedUnorderedMultimap_rdict.pcm libNestedUnorderedMultimap.so

types/unordered_multiset/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedUnorderedMultiset.so: NestedUnorderedMultiset.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedUnorderedMultiset_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedUnorderedMultiset.so: $(DICT_DIR)NestedUnorderedMultiset.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedUnorderedMultiset.cxx NestedUnorderedMultiset_rdict.pcm libNestedUnorderedMultiset.so

types/unordered_set/nested/Makefile

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

1717
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-
$(DICT_DIR)libNestedUnorderedSet.so: NestedUnorderedSet.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv NestedUnorderedSet_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libNestedUnorderedSet.so: $(DICT_DIR)NestedUnorderedSet.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) NestedUnorderedSet.cxx NestedUnorderedSet_rdict.pcm libNestedUnorderedSet.so

types/user/class/Makefile

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

1717
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-
$(DICT_DIR)libUserClass.so: UserClass.cxx
23-
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS)
24-
mv UserClass_rdict.pcm $(DICT_DIR)
22+
$(DICT_DIR)libUserClass.so: $(DICT_DIR)UserClass.cxx
23+
$(CXX) -shared -fPIC -o $@ $^ $(CXXFLAGS) $(LDFLAGS) -I $$(pwd)
2524

2625
clean:
2726
$(RM) UserClass.cxx UserClass_rdict.pcm libUserClass.so

0 commit comments

Comments
 (0)