on master help sign in
Add scripts to generate hscope db and tags
commit0c570febdddd554542da5efbf9bc846f37eaeb3f authorHarendra Kumar <harendra@composewell.com> dateThu 19 Nov 2020, 15:02 (6 years ago) parentd09f1ad
3 files changed+73
bin/mk-hscope.sh+46 bin/mk-tags.sh+25 streamly.cabal+2
bin/mk-hscope.shnew file+46
@@ -0,0 +1,46 @@
1+#!/usr/bin/env bash
2+
3+GHC_VERSION=8.8.3
4+STREAMLY_VERSION=0.7.2
5+
6+case `uname` in
7+ Darwin) SYSTEM=x86_64-osx;;
8+ Linux) SYSTEM=x86_64-linux;;
9+ *) echo "Unsupported system"; exit 1 ;;
10+esac
11+
12+pushd $(git rev-parse --show-toplevel)
13+git ls-files \
14+ | grep '\.l\?hs$' \
15+ | xargs hscope -b \
16+ -I src/ \
17+ -I test \
18+ -I dist-newstyle/build/$SYSTEM/ghc-$GHC_VERSION/streamly-$STREAMLY_VERSION/build/src/ \
19+ -X BangPatterns \
20+ -X CApiFFI \
21+ -X CPP \
22+ -X ConstraintKinds \
23+ -X DeriveDataTypeable \
24+ -X DeriveGeneric \
25+ -X DeriveTraversable \
26+ -X ExistentialQuantification \
27+ -X FlexibleContexts \
28+ -X FlexibleInstances \
29+ -X GeneralizedNewtypeDeriving \
30+ -X InstanceSigs \
31+ -X KindSignatures \
32+ -X LambdaCase \
33+ -X MagicHash \
34+ -X MultiParamTypeClasses \
35+ -X PatternSynonyms \
36+ -X RankNTypes \
37+ -X RecordWildCards \
38+ -X ScopedTypeVariables \
39+ -X TupleSections \
40+ -X TypeFamilies \
41+ -X ViewPatterns \
42+ -X NoMonoLocalBinds \
43+ -X TemplateHaskell \
44+ -X UnboxedTuples \
45+ -X UndecidableInstances
46+popd
bin/mk-tags.shnew file+25
@@ -0,0 +1,25 @@
1+#!/bin/sh
2+
3+HSCOPE_DIR=$HOME/.hscope
4+CODEX_CONFIG=$HOME/.codex
5+
6+if test -e $CODEX_CONFIG
7+then
8+ echo "Please move or remove $CODEX_CONFIG and then run again"
9+ exit 1
10+fi
11+
12+# XXX it does not seem to include the current project anyway
13+cat << EOF > $CODEX_CONFIG
14+currentProjectIncluded: true
15+hackagePath: $HSCOPE_DIR/packages/hackage.haskell.org/
16+tagsFileHeader: true
17+tagsFileName: tags
18+tagsFileSorted: true
19+tagsCmd: hasktags --ctags --follow-symlinks --output="\$TAGS" "\$SOURCES"
20+EOF
21+
22+# XXX depends on cabal configure, does not seem to be supporting new cabal
23+# XXX it depends in the hackage index tar file in ~/.cabal
24+codex update --force
25+rm -f $CODEX_CONFIG
streamly.cabal+2
@@ -118,6 +118,8 @@ extra-source-files:
118118 benchmark/lib/Streamly/Benchmark/*.hs
119119 benchmark/streamly-benchmarks.cabal
120120 bin/bench-exec-one.sh
121+ bin/mk-hscope.sh
122+ bin/mk-tags.sh
121123 cabal.project.ci
122124 charts-0/streamly-vs-list-time.svg
123125 configure