diff --git a/d/prog-lang-book/.gitignore b/d/prog-lang-book/.gitignore new file mode 100644 index 0000000..5b450d4 --- /dev/null +++ b/d/prog-lang-book/.gitignore @@ -0,0 +1 @@ +/bin/* diff --git a/d/prog-lang-book/Makefile b/d/prog-lang-book/Makefile new file mode 100644 index 0000000..2e26faa --- /dev/null +++ b/d/prog-lang-book/Makefile @@ -0,0 +1,7 @@ +ALL_SOURCES := $(shell find src -name '*.d') +ALL_TARGETS := $(patsubst src/%.d,bin/%,$(ALL_SOURCES)) + +bin/%: src/%.d + dmd $^ -of$@ + +$(ALL_TARGETS): $(ALL_SOURCES) diff --git a/d/prog-lang-book/bin/.gitkeep b/d/prog-lang-book/bin/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/d/prog-lang-book/src/hello.d b/d/prog-lang-book/src/hello.d new file mode 100755 index 0000000..859f89a --- /dev/null +++ b/d/prog-lang-book/src/hello.d @@ -0,0 +1,5 @@ +#!/usr/bin/env rdmd +import std.stdio; +void main() { + writeln("Hello, world!"); +}