summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf88fc0)
raw | patch | inline | side by side (parent: cf88fc0)
author | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Tue, 15 Nov 2011 20:34:08 +0000 (20:34 +0000) | ||
committer | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Tue, 15 Nov 2011 20:34:08 +0000 (20:34 +0000) |
30 files changed:
diff --git a/Makefile b/Makefile
index 415e3250cebaf0cde6ad7c7995e9f02e2ba2c42a..7a09b516badb1fd84a5e2d59e77685a1f7ca0350 100644 (file)
--- a/Makefile
+++ b/Makefile
# * $(MODULE)/*.cc -- module source files
MODULES := main reader store alien typeregister textmodel fold typepath
-CFLAGS := -I.
+CFLAGS += -I.
# Variables for the modules to write to
SRCS :=
odcread: $(SRCS:.cc=.o)
g++ -o $@ $^
+# This rule build an object (.o) from a source (.cc).
%.o: %.cc
g++ $(CFLAGS) $< -c -o $@
# The .d file is not an explicit target because it will need to be (re-)built
# if and only if the .ih.gch needs to be rebuilt.
%.ih.gch: %.ih
- g++ $(CFLAGS) -x c++-header $< -MM -MF $(dir $@)module.d -MP -MT $@
+ g++ $(CFLAGS) -x c++-header $< -MM -MF $*.d -MP -MT $@
g++ $(CFLAGS) -x c++-header $< -o $@
-# This rule build an object (.o) from a source (.cc).
# Each module has a .ih file that should be *the only* include from the .cc
# files. These .ih files are pre-compiled to .ih.gch, and dependency caching
# is based on the .ih files, not the .cc files.
define depend_on_compiled_header
-$(patsubst %.cc,%.o,$(1)) : $(dir $(1))$(patsubst %/,%,$(dir $(1))).ih.gch
+$(patsubst %.cc,%.o,$(1)) : $(dir $(1))module.ih.gch
endef
$(foreach src,$(SRCS),$(eval $(call depend_on_compiled_header,$(src))))
# Include the generated dependency files (if they exist)
-include $(patsubst %,%/module.d,$(MODULES))
-
-# TODO: rename all %/%.ih files to %/module.ih for simplicity of matching rules
diff --git a/alien/alien.cc b/alien/alien.cc
index d00a4b886e50a68bc3109c27cb952472a824c2f0..102c8ca22dce6ef24b5fdecffaafdff12052f5b2 100644 (file)
--- a/alien/alien.cc
+++ b/alien/alien.cc
-#include "alien/alien.ih"
+#include "alien/module.ih"
namespace odc {
diff --git a/alien/alien.ih b/alien/module.ih
diff --git a/alien/part.cc b/alien/part.cc
index 1f7ff4765e95cfdc64141e4185a1c8dc3f3aa9cc..8807c998f952a0ef4bcd013c9930a365d795d35f 100644 (file)
--- a/alien/part.cc
+++ b/alien/part.cc
-#include "alien/alien.ih"
+#include "alien/module.ih"
namespace odc {
diff --git a/alien/piece.cc b/alien/piece.cc
index 82e3a0cea854d93e1a9724ddd63fd39bd64e4c48..1aa7bd839eb8b9f71662ae7e973ba77a0c921f4b 100644 (file)
--- a/alien/piece.cc
+++ b/alien/piece.cc
-#include "alien/alien.ih"
+#include "alien/module.ih"
namespace odc {
diff --git a/fold/fold.cc b/fold/fold.cc
index 94ed5878f6f00a1831f2f3b671f3285118ac925d..9a0195f941ea010f7d9eb40c78beaeaf9909eaec 100644 (file)
--- a/fold/fold.cc
+++ b/fold/fold.cc
-#include "fold/fold.ih"
+#include "fold/module.ih"
namespace odc {
diff --git a/fold/fold.ih b/fold/module.ih
diff --git a/main/main.ih b/main/module.ih
diff --git a/main/odcread.cc b/main/odcread.cc
index 075671fadc1c9dddb39c74cc1b81c64f9d8639ed..9a7f95af5a2a17e27d6275da53e298c16e927252 100644 (file)
--- a/main/odcread.cc
+++ b/main/odcread.cc
-#include "main/main.ih"
+#include "main/module.ih"
namespace odc {
class Context {
index 5def034dac7536918d7e10f9b4b52fd57866ee39..33fae6ac0db8a456646d1124e0c9136df2472848 100644 (file)
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/fixTypeName.cc b/reader/fixTypeName.cc
index cc33fe519e8c562d2de9619473908277eda2ef4d..a426908cf0f0e03882ba70191cf543b9ecbb795b 100644 (file)
--- a/reader/fixTypeName.cc
+++ b/reader/fixTypeName.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/reader.ih b/reader/module.ih
diff --git a/reader/readAlien.cc b/reader/readAlien.cc
index 2ccf9f0fdd91e40a80f66eb0227b668ce033968b..ba96ca54e7d45f74bbe11555a9102d69e8786524 100644 (file)
--- a/reader/readAlien.cc
+++ b/reader/readAlien.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
index b08718958d29407a94bdfe5cf11990f55121eaec..31bd74ad350713600e02b4d41ecfc751616f8ce1 100644 (file)
--- a/reader/readLinkStore.cc
+++ b/reader/readLinkStore.cc
-
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
index 24f88069601ab0e51f4caf6011651e384b6338d4..5e3fba1279cb43f86a267f49e69ab3f76c19dfde 100644 (file)
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/readNilStore.cc b/reader/readNilStore.cc
index aa1e4f2647df92484419bf49b1815b5b66adc78a..9f905e6159b5f0f543a747a4995b8e4615f2dd37 100644 (file)
--- a/reader/readNilStore.cc
+++ b/reader/readNilStore.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/readPath.cc b/reader/readPath.cc
index 397f2aceee802da53c6b817e961ec576d0715ae5..f92bfd00c19af7f403306ff9074f22e2c2b4ec4c 100644 (file)
--- a/reader/readPath.cc
+++ b/reader/readPath.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/readStore.cc b/reader/readStore.cc
index 1ab921feaf3ca82c2777470c14baed39f734e3d0..f9769368b48a7b6a81a8062fea263e4bacc62fc7 100644 (file)
--- a/reader/readStore.cc
+++ b/reader/readStore.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
index 0c89bb33dd29c831f2ebea2b7d7e04ed3b15bc32..168fc73b406e23585156ce55d562cbf6b70795fd 100644 (file)
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/readVersion.cc b/reader/readVersion.cc
index 5b13aff84873fcba0d1c92fd621a8e40772e5af1..799885dc0acfa58f4e92a658b16cf0c8a91f798f 100644 (file)
--- a/reader/readVersion.cc
+++ b/reader/readVersion.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/reader.cc b/reader/reader.cc
index 1395bba09f9592d5dcf77ca9770838d01d81d536..ec731bd7224fc39acb72a46428efbae0c8813016 100644 (file)
--- a/reader/reader.cc
+++ b/reader/reader.cc
-#include "reader/reader.ih"
+#include "reader/module.ih"
namespace odc {
diff --git a/reader/util.cc b/reader/util.cc
index 76cd6af8efc712725939a11fd0df084151e79c93..0d53e11c5b3d5476ae86d850d7cd4a8f79af6d5c 100644 (file)
--- a/reader/util.cc
+++ b/reader/util.cc
-#include "reader/reader.h"
+#include "reader/module.ih"
namespace odc {
bool Reader::isBigEndian() { // http://stackoverflow.com/questions/1001307/detecting-endianness-programmatically-in-a-c-program
diff --git a/store/store.ih b/store/module.ih
diff --git a/store/store.cc b/store/store.cc
index a967518550e594006e06d24ded0ebbe16157605c..e9dbb932b9d6097817485c712fba5155a8c76165 100644 (file)
--- a/store/store.cc
+++ b/store/store.cc
-#include "store/store.ih"
+#include "store/module.ih"
namespace odc {
diff --git a/textmodel/textmodel.ih b/textmodel/module.ih
diff --git a/textmodel/textmodel.cc b/textmodel/textmodel.cc
index aa2819304f10de7203ad066ac47d8983100f85ac..b081a79c9f25395cb67baf324b18c9903a593928 100644 (file)
--- a/textmodel/textmodel.cc
+++ b/textmodel/textmodel.cc
-#include "textmodel/textmodel.ih"
+#include "textmodel/module.ih"
namespace odc {
diff --git a/typepath/typepath.ih b/typepath/module.ih
diff --git a/typepath/toString.cc b/typepath/toString.cc
index dd532b12ac9d6fe1df5d7edcc05ba573f275daac..25dc5fb462459e33bf8a2103c6e152d6873a2dbe 100644 (file)
--- a/typepath/toString.cc
+++ b/typepath/toString.cc
-#include "typepath/typepath.ih"
+#include "typepath/module.ih"
namespace odc {
index 0093b9a0618b929c9f887cc5cbbdaab7965f1742..05d780f9a041871cc950e9f7e947280ec53fbb38 100644 (file)
-#include "typeregister/typeregister.ih"
+#include "typeregister/module.ih"
namespace odc {