diff --git a/.gitignore b/.gitignore index 3ba9bbf..6c33f84 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ init/init factorial/factorial datatypes/datatypes appending/appending +import/import diff --git a/import/Makefile b/import/Makefile new file mode 100644 index 0000000..e2e1746 --- /dev/null +++ b/import/Makefile @@ -0,0 +1,13 @@ + +TARGET := import +DFLAGS := -funittest -J. + +all: $(TARGET) + +$(TARGET): $(TARGET).d + +%: %.d + gdc -o $@ $(DFLAGS) $< + +clean: + -rm -f *.o *~ $(TARGET) diff --git a/import/file1 b/import/file1 new file mode 100644 index 0000000..c278a75 --- /dev/null +++ b/import/file1 @@ -0,0 +1 @@ +This is file1 diff --git a/import/file2/file2 b/import/file2/file2 new file mode 100644 index 0000000..3899654 --- /dev/null +++ b/import/file2/file2 @@ -0,0 +1,2 @@ +This is file2 +It has two lines. diff --git a/import/import.d b/import/import.d new file mode 100644 index 0000000..3fe820a --- /dev/null +++ b/import/import.d @@ -0,0 +1,9 @@ +import std.stdio; + +void main(string[] args) +{ + writefln("file1:"); + writefln(import("file1")); + writefln("file2/file2:"); + writefln(import("file2/file2")); +}