packages feed

gdo 0.1.3 → 0.1.4

raw patch · 3 files changed

+53/−5 lines, 3 files

Files

+ build_util.sh view
@@ -0,0 +1,16 @@+HASKELL_PACKAGES="process filepath directory containers transformers bytestring cryptonite"+for p in ${HASKELL_PACKAGES}; do+    GHC_PACKAGES="-package $p ${GHC_PACKAGES}"+done++function filter_comments () {+    grep -ve "^#"+}++function extract_object_deps () {+    grep -E "^${1}\\.o" | cut -d ':' -f2 | tr -d ' '+}++function extract_exec_deps () {+    grep -E -e "^[^\.]*.o " | cut -d ':' -f1 | tr -d ' ' | sort -u+}
+ default.o.do view
@@ -0,0 +1,30 @@+#!/bin/sh++# build a default .o file from haskell source++set -e++BASENAME=$2++gdo --if Created environment+gdo --if Changed $2.hs+gdo --if Changed build_util.sh++source ./build_util.sh++if [ -e environment ]; then+    source ./environment+fi++TEMPMAKEFILE=$(mktemp)++trap "rm ${TEMPMAKEFILE} -rf" EXIT SIGTERM SIGINT++${HC} $2.hs -M -dep-suffix '' -dep-makefile ${TEMPMAKEFILE}+DEPS=$(cat ${TEMPMAKEFILE} | filter_comments | extract_object_deps $2)+set +e+OBJECTS=$(echo ${DEPS} | grep -E "\.o")+set -e+gdo --if Changed ${DEPS}+${HC} -fforce-recomp -c $2.hs -o $3+
gdo.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/  name:                gdo-version:             0.1.3+version:             0.1.4 synopsis:            recursive atomic build system description:   *gdo* is a build system similar to **GNU Make**. It builds files from@@ -20,15 +20,17 @@                    , README.org                    , Setup.hs                    , all.do+                   , build_util.sh                    , clean.do                    , default.nix.do-                   , shell.nix.do+                   , default.o.do+                   , examples/defaults/default.o.do+                   , examples/test.c+                   , examples/test.do                    , gdo.cabal                    , gdo.do                    , man/gdo.1.do-                   , examples/test.c-                   , examples/test.do-                   , examples/defaults/default.o.do+                   , shell.nix.do  cabal-version:       >=1.10