Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163575125
D34015.id101846.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
748 B
Referenced Files
None
Subscribers
None
D34015.id101846.diff
View Options
Index: .hooks/pre-commit
===================================================================
--- /dev/null
+++ .hooks/pre-commit
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Check that ports are hooked into the build
+#
+
+newish_makefiles=$(git diff --name-only --cached --diff-filter=ACR | grep -E '^[^/]+/[^/]+/Makefile$')
+if [ $? -eq 0 ] ; then
+ for newish_makefile in ${newish_makefiles} ; do
+ category=$(echo "${newish_makefile}" | awk -F '/' '{print $1}')
+ port=$(echo "${newish_makefile}" | awk -F '/' '{print $2}')
+ grep -q -E "^[[:space:]]+SUBDIR[[:space:]]\+=[[:space:]]*${port}\$" ${category}/Makefile
+ if [ $? -ne 0 ] ; then
+ echo "[pre-commit] ERROR: Missing 'SUBDIR += ${port}' in ${category}/Makefile"
+ exit 1
+ fi
+ done
+fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 25, 3:42 PM (16 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35478449
Default Alt Text
D34015.id101846.diff (748 B)
Attached To
Mode
D34015: framework: add hook to detect whether new ports are hooked into the tree
Attached
Detach File
Event Timeline
Log In to Comment