Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147934416
D3942.id9515.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3942.id9515.diff
View Options
Index: Mk/Uses/shebangfix.mk
===================================================================
--- Mk/Uses/shebangfix.mk
+++ Mk/Uses/shebangfix.mk
@@ -29,44 +29,23 @@
.if !defined(_INCLUDE_USES_SHEBANGFIX_MK)
_INCLUDE_USES_SHEBANGFIX_MK= yes
-bash_OLD_CMD+= /bin/bash
-bash_OLD_CMD+= "/usr/bin/env bash"
-bash_CMD?= ${LOCALBASE}/bin/bash
-java_OLD_CMD+= /usr/bin/java
-java_CMD?= ${LOCALBASE}/bin/java
-ksh_OLD_CMD+= /bin/ksh
-ksh_CMD?= ${LOCALBASE}/bin/ksh
+SHEBANG_LANG+= bash java ksh perl php python ruby tcl tk
+
.if ${USES:Mlua*}
-lua_OLD_CMD+= /usr/bin/lua
-lua_OLD_CMD+= "/usr/bin/env lua"
+SHEBANG_LANG+= lua
lua_CMD?= ${LOCALBASE}/bin/${LUA_CMD}
.endif
-perl_OLD_CMD+= /usr/bin/perl
-perl_OLD_CMD+= "/usr/bin/env perl"
-perl_OLD_CMD+= perl
-perl_CMD?= ${LOCALBASE}/bin/perl
-php_OLD_CMD+= /usr/bin/php
-php_CMD?= ${LOCALBASE}/bin/php
-python_OLD_CMD+= /usr/bin/python
-python_OLD_CMD+= "/usr/bin/env python"
+
.if ${USES:Mpython*}
python_CMD?= ${PYTHON_CMD}
-.else
-python_CMD?= ${LOCALBASE}/bin/python
.endif
-ruby_OLD_CMD+= /usr/bin/ruby
-ruby_OLD_CMD+= "/usr/bin/env ruby"
-ruby_CMD?= ${LOCALBASE}/bin/ruby
-tcl_OLD_CMD+= /usr/bin/tclsh
-tcl_CMD?= ${TCLSH}
-tk_OLD_CMD+= /usr/bin/wish
-tk_CMD?= ${WISH}
-
-SHEBANG_LANG+= bash java ksh perl php python ruby tcl tk
-.if ${USES:Mlua*}
-SHEBANG_LANG+= lua
-.endif
+.for lang in ${SHEBANG_LANG}
+${lang}_CMD?= ${LOCALBASE}/bin/${lang}
+${lang}_OLD_CMD+= "/usr/bin/env ${lang}"
+${lang}_OLD_CMD+= /bin/${lang}
+${lang}_OLD_CMD+= /usr/bin/${lang}
+.endfor
.for lang in ${SHEBANG_LANG}
. if !defined(${lang}_CMD)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 15, 6:57 PM (8 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29728499
Default Alt Text
D3942.id9515.diff (1 KB)
Attached To
Mode
D3942: Remove all of the duplicated logic in shebangfix.
Attached
Detach File
Event Timeline
Log In to Comment