Merge pull request #612 from WebFreak001/common-subpackage
Move dcd.common into separate subpackage merged-on-behalf-of: Jan Jurzitza <gh@webfreak.org>
This commit is contained in:
commit
f22b193deb
|
@ -0,0 +1,7 @@
|
||||||
|
name "common"
|
||||||
|
stringImportPaths "../bin"
|
||||||
|
preGenerateCommands "rdmd \"$PACKAGE_DIR/dubhash.d\""
|
||||||
|
sourcePaths "src"
|
||||||
|
importPaths "src"
|
||||||
|
|
||||||
|
dependency "msgpack-d" version="~>1.0.0-beta.7"
|
|
@ -11,13 +11,13 @@ import std.string;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
auto dir = environment.get("DUB_PACKAGE_DIR");
|
auto dir = environment.get("DUB_PACKAGE_DIR");
|
||||||
auto hashFile = dir.buildPath("bin", "dubhash.txt");
|
auto hashFile = dir.buildPath("..", "bin", "dubhash.txt");
|
||||||
auto gitVer = executeShell("git -C " ~ dir ~ " describe --tags");
|
auto gitVer = executeShell("git -C " ~ dir ~ " describe --tags");
|
||||||
auto ver = (gitVer.status == 0 ? gitVer.output.strip
|
auto ver = (gitVer.status == 0 ? gitVer.output.strip
|
||||||
: "v" ~ dir.dirName.baseName.findSplitAfter(
|
: "v" ~ dir.dirName.baseName.findSplitAfter(
|
||||||
environment.get("DUB_ROOT_PACKAGE") ~ "-")[1]).ifThrown("0.0.0")
|
environment.get("DUB_ROOT_PACKAGE") ~ "-")[1]).ifThrown("0.0.0")
|
||||||
.chain(newline).to!string.strip;
|
.chain(newline).to!string.strip;
|
||||||
dir.buildPath("bin").mkdirRecurse;
|
dir.buildPath("..", "bin").mkdirRecurse;
|
||||||
if (!hashFile.exists || ver != hashFile.readText.strip)
|
if (!hashFile.exists || ver != hashFile.readText.strip)
|
||||||
hashFile.write(ver);
|
hashFile.write(ver);
|
||||||
}
|
}
|
|
@ -206,7 +206,7 @@ immutable ConstantCompletion[] traits = [
|
||||||
|
|
||||||
string part3 = "];";
|
string part3 = "];";
|
||||||
|
|
||||||
auto file = File("../src/dcd/common/constants2.d", "w");
|
auto file = File("../common/src/dcd/common/constants2.d", "w");
|
||||||
file.writeln(part1);
|
file.writeln(part1);
|
||||||
foreach (pragma_; pragmas.sorted)
|
foreach (pragma_; pragmas.sorted)
|
||||||
file.writeln('\t', pragma_, ",");
|
file.writeln('\t', pragma_, ",");
|
||||||
|
|
9
dub.json
9
dub.json
|
@ -9,13 +9,11 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dsymbol": "~>0.9.0",
|
"dsymbol": "~>0.9.0",
|
||||||
"libdparse": "~>0.13.0",
|
"libdparse": "~>0.13.0",
|
||||||
"msgpack-d": "~>1.0.0-beta.7",
|
":common": "*",
|
||||||
"stdx-allocator": "~>2.77.5",
|
"stdx-allocator": "~>2.77.5",
|
||||||
"emsi_containers": "~>0.8.0-alpha.15"
|
"emsi_containers": "~>0.8.0-alpha.15"
|
||||||
},
|
},
|
||||||
"stringImportPaths" : [
|
"subPackages": ["common"],
|
||||||
"bin"
|
|
||||||
],
|
|
||||||
"versions": ["built_with_dub"],
|
"versions": ["built_with_dub"],
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
|
@ -44,8 +42,5 @@
|
||||||
"src/dcd/client/*"
|
"src/dcd/client/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"preGenerateCommands" : [
|
|
||||||
"rdmd \"$PACKAGE_DIR/dubhash.d\""
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
4
makefile
4
makefile
|
@ -31,7 +31,7 @@ clean:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
|
|
||||||
CLIENT_SRC := \
|
CLIENT_SRC := \
|
||||||
$(shell find src/dcd/common -name "*.d")\
|
$(shell find common/src/dcd/common -name "*.d")\
|
||||||
$(shell find src/dcd/client -name "*.d")\
|
$(shell find src/dcd/client -name "*.d")\
|
||||||
$(shell find msgpack-d/src/ -name "*.d")
|
$(shell find msgpack-d/src/ -name "*.d")
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ override LDC_CLIENT_FLAGS += $(DFLAGS)
|
||||||
override GDC_CLIENT_FLAGS += $(DFLAGS)
|
override GDC_CLIENT_FLAGS += $(DFLAGS)
|
||||||
|
|
||||||
SERVER_SRC := \
|
SERVER_SRC := \
|
||||||
$(shell find src/dcd/common -name "*.d")\
|
$(shell find common/src/dcd/common -name "*.d")\
|
||||||
$(shell find src/dcd/server -name "*.d")\
|
$(shell find src/dcd/server -name "*.d")\
|
||||||
$(shell find ${DSYMBOL_DIR}/src -name "*.d")\
|
$(shell find ${DSYMBOL_DIR}/src -name "*.d")\
|
||||||
$(shell find ${STDXALLOC_DIR}/source -name "*.d")\
|
$(shell find ${STDXALLOC_DIR}/source -name "*.d")\
|
||||||
|
|
Loading…
Reference in New Issue