pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gopkgdep: simple scan fragment.
Module Name: pkgsrc-wip
Committed By: Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By: bsiegert
Date: Tue May 30 22:58:01 2017 +0200
Changeset: f559f490fea64a5ddd9d7f18b453412dc2ea6fff
Added Files:
gopkgdep/files/scan.sh
Log Message:
gopkgdep: simple scan fragment.
This outputs a table of directory<TAB>GO_SRCPATH for pkgsrc.
Next up: Join the list against the list of imports from the go output.
And/or rewrite the whole thing in a real programming language (Perl?)
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f559f490fea64a5ddd9d7f18b453412dc2ea6fff
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gopkgdep/files/scan.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diffs:
diff --git a/gopkgdep/files/scan.sh b/gopkgdep/files/scan.sh
new file mode 100644
index 0000000000..3616ccaab7
--- /dev/null
+++ b/gopkgdep/files/scan.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Scan a pkgsrc tree for GO_SRCPATH. To be run from the top-level dir.
+#
+# To optimize scan time, this only greps for files including go-package.mk.
+# If the include is in a Makefile.common, this will break.
+
+: ${MAKE:=bmake}
+
+for i in */*; do
+ fgrep -q GO_SRCPATH $i/Makefile 2>/dev/null && {
+ printf "$i\t"
+ ${MAKE} -C $i show-var VARNAME=GO_SRCPATH 2>/dev/null
+ }
+done
Home |
Main Index |
Thread Index |
Old Index