Dactyloidae/python/mozbuild/mozbuild
athenian200 362f15fbfc MoonchildProductions#1251 - Part 19: Make the unpreprocessed file script work on Solaris.
https://www.tachytelic.net/2019/01/grep-recursively/

During testing, I tried simply replacing grep with ggrep, which was non-portable but worked fine. Using an environment variable with os.getenv set to 'g' also worked, but the problem with that approach is that you have to set it manually and some times the script will mess up if you don't explictly define it to an empty string for platforms that don't need it.

Setting TOOLCHAIN_PREFIX to 'g' seemed to solve all of my problems except this one, and it appears to be the only non-portable use of GNU grep in the whole tree. To understand what I tried to do here, let me present with you with two commands that yield the same output on my machine:

find . -name '*.xul' | xargs grep -E "#include"

ggrep -E -r "#include" --include="*.xul" .

I just tried to make the Python script follow the logic of those two commands, though I'm not sure how well I succeeded since I got no errors. I visualized everything this way:

ggrep -E -r "<strings>" --include="<filesuffixes>" <path>

find <path> -name '<filesuffixes>' | xargs grep -E "<strings>"

And arranged it all accordingly to the best of my ability, though I should point out that Python is not my strong suit.
2019-11-04 11:53:54 +08:00
..
action Shell quote environment variable values when dumping them in dump_env.py 2019-02-16 00:10:53 +08:00
backend Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
codecoverage import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
compilation import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
configure MoonchildProductions#1251 - Part 4: Core build system changes, lots of libevent/IPC junk. 2019-11-04 11:52:17 +08:00
controller Flush some more buildlog output to screen when prudent. 2019-02-16 00:13:39 +08:00
frontend Remove Rust from the tree. 2019-02-15 23:36:42 +08:00
locale/en-US/LC_MESSAGES import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
resources/html-build-viewer import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
test Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
__init__.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
android_version_code.py Use UTC where appropriate in python files 2019-02-14 14:28:19 +08:00
artifacts.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
base.py Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
config_status.py Make sure the waiting message is actually displayed. 2019-02-16 00:02:05 +08:00
doctor.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
dotproperties.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
html_build_viewer.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
jar.py Preprocessor warnings should not be fatal errors 2019-02-14 14:28:14 +08:00
mach_commands.py MoonchildProductions#1251 - Part 19: Make the unpreprocessed file script work on Solaris. 2019-11-04 11:53:54 +08:00
makeutil.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
milestone.py Pick up major+minor milestone version from GRE milestone file. 2019-02-15 23:33:01 +08:00
mozconfig.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
mozconfig_loader MoonchildProductions#1251 - Part 2: Make the mozconfig loader POSIX-compliant. 2019-11-04 11:52:14 +08:00
mozinfo.py Remove other gonk widget conditionals and unused files. 2019-02-15 23:57:15 +08:00
preprocessor.py Preprocessor warnings should not be fatal errors 2019-02-14 14:28:14 +08:00
pythonutil.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
shellutil.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
sphinx.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
testing.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
util.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
vendor_rust.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00
virtualenv.py import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00