gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet-nim] 57/61: Add nakefile, nim.cfg, and ignore more


From: gnunet
Subject: [GNUnet-SVN] [gnunet-nim] 57/61: Add nakefile, nim.cfg, and ignore more things
Date: Sat, 13 Apr 2019 13:36:32 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnunet-nim.

commit 0e7306fbee8b807b7fcae7f6e9026dcb0322cc2d
Author: Nils Gillmann <address@hidden>
AuthorDate: Sun Sep 16 13:03:18 2018 +0000

    Add nakefile, nim.cfg, and ignore more things
    
    Signed-off-by: Nils Gillmann <address@hidden>
---
 .gitignore   |  7 +++++--
 nakefile.nim | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 nim.cfg      |  1 +
 3 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 388c089..b4c2599 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,10 @@
 /gnunet_nim
-/nimcache
+nimcache
 /gnunet_data_home
 /gnunet_home
 /otherpeer_data_home
 /otherpeer_home
-
+examples/groupchat
+*.pretty.nim
+*.backup
+nakefile
diff --git a/nakefile.nim b/nakefile.nim
new file mode 100644
index 0000000..2621ac2
--- /dev/null
+++ b/nakefile.nim
@@ -0,0 +1,46 @@
+import nake
+import sequtils
+
+proc build() =
+  let
+    dest = "examples/groupchat"
+    src = dest & ".nim"
+
+  if dest.needsRefresh(src):
+    direSilentShell(src & " -> " & dest,
+                                   nimExe, "c", "--verbosity:2",
+                                   src)
+
+# Not fully functional or functional at all right now:
+proc buildDocs() =
+  for name in ["asynccadet", "gnunet_application",
+               "gnunet_cadet_service", "gnunet_common",
+               "gnunet_configuration_lib", "gnunet_crypto_lib",
+               "gnunet_mq_lib", "gnunet_protocols",
+               "gnunet_scheduler_lib", "gnunet_time_lib",
+               "gnunet_types", "gnunet_utils"]:
+    let
+      dest = name & ".html"
+      src = name & ".nim"
+
+    if dest.needsRefresh(src):
+      direSilentShell(src & " -> " & dest,
+                                     nimExe, "doc2", "--verbosity:0", 
"--index:on", src)
+
+  for rstSrc in walkFiles("*.rst"):
+    let rstDest = rstSrc.changeFileExt(".html")
+    if not rstDest.needsRefresh(rstSrc): continue
+    direSilentShell(rstSrc & " -> " & rstDest,
+                                      nimExe & " rst2html --verbosity:0 
--index:on -o:" &
+                                      rstDest & " " & rstSrc)
+
+  direSilentShell("Building theindex.html", nimExe, "buildIndex .")
+
+
+task "docs", "generate user documentation for nake API and local rst files":
+  buildDocs()
+  echo "Finished generating docs"
+
+task "build", "build binaries and examples":
+  build()
+  echo "Finished build"
diff --git a/nim.cfg b/nim.cfg
new file mode 100644
index 0000000..1938d27
--- /dev/null
+++ b/nim.cfg
@@ -0,0 +1 @@
+-p:"$HOME/.guix-profile/lib/nim/packages"

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]