├── OWNERS ├── test ├── make │ ├── main.h │ ├── noload │ │ ├── lib │ │ │ ├── shared.h │ │ │ ├── shared.c │ │ │ └── shared.gyp │ │ └── main.c │ ├── main.cc │ └── dependencies.gyp ├── many-actions │ ├── file0 │ ├── file1 │ ├── file2 │ ├── file3 │ └── file4 ├── win │ ├── asm-files │ │ ├── b.s │ │ ├── c.S │ │ └── hello.cc │ ├── command-quote │ │ ├── a.S │ │ ├── go.bat │ │ └── bat with spaces.bat │ ├── vs-macros │ │ ├── input.S │ │ ├── stuff.blah │ │ ├── hello.cc │ │ ├── do_stuff.py │ │ └── test_exists.py │ ├── system-include │ │ ├── bar │ │ │ └── header.h │ │ ├── foo │ │ │ └── header.h │ │ ├── common │ │ │ └── commonheader.h │ │ └── main.cc │ ├── batch-file-action │ │ ├── infile │ │ └── somecmd.bat │ ├── compiler-flags │ │ ├── subdir │ │ │ └── header.h │ │ ├── calling-convention-cdecl.def │ │ ├── hello.cc │ │ ├── calling-convention-fastcall.def │ │ ├── calling-convention-stdcall.def │ │ ├── calling-convention-vectorcall.def │ │ ├── calling-convention.cc │ │ ├── pdbname.cc │ │ ├── precomp.cc │ │ ├── force-include-files.cc │ │ ├── rtti-on.cc │ │ ├── warning-level1.cc │ │ ├── character-set-mbcs.cc │ │ ├── warning-as-error.cc │ │ ├── disable-specific-warnings.cc │ │ ├── function-level-linking.cc │ │ ├── runtime-checks.cc │ │ ├── force-include-files-with-precompiled.cc │ │ ├── treat-wchar-t-as-built-in-type1.cc │ │ ├── treat-wchar-t-as-built-in-type2.cc │ │ ├── warning-level4.cc │ │ ├── additional-include-dirs.cc │ │ ├── character-set-unicode.cc │ │ ├── warning-level2.cc │ │ ├── additional-options.cc │ │ ├── uninit.cc │ │ ├── buffer-security.cc │ │ ├── runtime-library-md.cc │ │ ├── runtime-library-mt.cc │ │ ├── runtime-library-mtd.cc │ │ ├── warning-level3.cc │ │ ├── runtime-library-mdd.cc │ │ ├── floating-point-model-fast.cc │ │ ├── floating-point-model-precise.cc │ │ └── floating-point-model-strict.cc │ ├── rc-build │ │ ├── hello.h │ │ ├── subdir │ │ │ └── include.h │ │ ├── hello.ico │ │ └── small.ico │ ├── ml-safeseh │ │ ├── a.asm │ │ └── hello.cc │ ├── linker-flags │ │ ├── safeseh_zero.asm │ │ ├── x.cc │ │ ├── y.cc │ │ ├── z.cc │ │ ├── a │ │ │ ├── x.cc │ │ │ └── z.cc │ │ ├── b │ │ │ └── y.cc │ │ ├── hello.cc │ │ ├── inline_test.h │ │ ├── library-directories-define.cc │ │ ├── deffile.def │ │ ├── opt-ref.cc │ │ ├── safeseh_hello.cc │ │ ├── additional-deps.cc │ │ ├── delay-load.cc │ │ ├── library-adjust.cc │ │ ├── main-crt.c │ │ ├── subsystem-windows.cc │ │ ├── library-directories-reference.cc │ │ ├── deffile.cc │ │ ├── link-warning.cc │ │ ├── mapfile.cc │ │ ├── no-default-libs.gyp │ │ ├── unsupported-manifest.gyp │ │ ├── subdir │ │ │ └── library.gyp │ │ └── inline_test.cc │ ├── lib-flags │ │ ├── answer.h │ │ └── answer.cc │ ├── shard │ │ ├── hello.cc │ │ ├── hello1.cc │ │ ├── hello2.cc │ │ ├── hello3.cc │ │ └── hello4.cc │ ├── uldi │ │ ├── a.cc │ │ ├── b.cc │ │ └── main.cc │ ├── idl-excluded │ │ ├── program.cc │ │ ├── bad.idl │ │ └── copy-file.py │ ├── idl-includedirs │ │ ├── hello.cc │ │ └── subdir │ │ │ ├── bar.idl │ │ │ └── foo.idl │ ├── large-pdb │ │ ├── main.cc │ │ └── dllmain.cc │ ├── long-command-line │ │ ├── function.cc │ │ └── hello.cc │ ├── idl-rules │ │ └── Window.idl │ ├── importlib │ │ ├── hello.cc │ │ └── has-exports.cc │ ├── precompiled │ │ ├── precomp.c │ │ └── hello2.c │ └── generator-output-different-drive │ │ ├── prog.c │ │ └── prog.gyp ├── mac │ ├── app-bundle │ │ ├── empty.c │ │ └── TestApp │ │ │ ├── English.lproj │ │ │ ├── utf-16be.strings │ │ │ ├── utf-16le.strings │ │ │ ├── InfoPlist.strings │ │ │ └── InfoPlist-error.strings │ │ │ ├── Images.xcassets │ │ │ └── image.imageset │ │ │ │ ├── super_sylvain.png │ │ │ │ ├── super_sylvain@2x.png │ │ │ │ └── super_sylvain@3x.png │ │ │ ├── main.m │ │ │ └── TestAppAppDelegate.h │ ├── framework │ │ ├── empty.c │ │ └── TestFramework │ │ │ ├── English.lproj │ │ │ └── InfoPlist.strings │ │ │ ├── TestFramework_Prefix.pch │ │ │ └── ObjCVectorInternal.h │ ├── rebuild │ │ ├── empty.c │ │ ├── main.c │ │ └── delay-touch.sh │ ├── postbuild-copy-bundle │ │ ├── empty.c │ │ ├── copied.txt │ │ ├── resource_file.sb │ │ ├── main.c │ │ └── postbuild-copy-framework.sh │ ├── rpath │ │ ├── file.c │ │ └── main.c │ ├── xcode-env-order │ │ ├── file.ext1 │ │ ├── file.ext2 │ │ ├── file.ext3 │ │ └── main.c │ ├── xctest │ │ ├── resource.txt │ │ ├── MyClass.m │ │ └── MyClass.h │ ├── xcode-support-actions │ │ └── source.c │ ├── archs │ │ ├── empty_main.cc │ │ ├── header.h │ │ ├── file.mm │ │ ├── my_file.cc │ │ ├── file_a.cc │ │ ├── file_b.cc │ │ ├── my_main_file.cc │ │ ├── file_c.cc │ │ ├── file_d.cc │ │ ├── file_a.h │ │ └── file_b.h │ ├── bundle-resources │ │ ├── secret.txt │ │ ├── change.sh │ │ └── executable-file.sh │ ├── copy-dylib │ │ └── empty.c │ ├── installname │ │ ├── main.c │ │ └── file.c │ ├── ldflags-libtool │ │ └── file.c │ ├── objc-gc │ │ ├── c-file.c │ │ ├── cc-file.cc │ │ ├── needs-gc.m │ │ ├── needs-gc-mm.mm │ │ └── main.m │ ├── sourceless-module │ │ ├── empty.txt │ │ ├── empty.c │ │ └── fun.c │ ├── global-settings │ │ └── src │ │ │ ├── dir2 │ │ │ └── file.txt │ │ │ └── dir1 │ │ │ └── dir1.gyp │ ├── ldflags │ │ └── subdirectory │ │ │ ├── symbol_list.def │ │ │ ├── file.c │ │ │ └── Info.plist │ ├── prefixheader │ │ ├── header.h │ │ ├── file.c │ │ ├── file.cc │ │ ├── file.m │ │ └── file.mm │ ├── unicode-settings │ │ ├── file.cc │ │ └── test_bundle_display_name.sh │ ├── depend-on-bundle │ │ ├── bundle.c │ │ ├── executable.c │ │ └── English.lproj │ │ │ └── InfoPlist.strings │ ├── missing-cfbundlesignature │ │ ├── file.c │ │ └── Info.plist │ ├── postbuilds │ │ ├── copy.sh │ │ ├── subdirectory │ │ │ └── copied_file.txt │ │ ├── file.c │ │ ├── file_g.c │ │ └── file_h.c │ ├── strip │ │ ├── subdirectory │ │ │ ├── nested_file.c │ │ │ ├── test_reading_save_file_from_postbuild.sh │ │ │ └── nested_strip.saves │ │ └── strip.saves │ ├── sdkroot │ │ └── file.cc │ ├── libraries │ │ └── subdir │ │ │ ├── README.txt │ │ │ ├── mylib.c │ │ │ └── hello.cc │ ├── objc-arc │ │ ├── c-file.c │ │ ├── cc-file.cc │ │ ├── m-file.m │ │ ├── mm-file.mm │ │ ├── m-file-no-arc.m │ │ └── mm-file-no-arc.mm │ ├── cflags │ │ ├── cfile.c │ │ ├── mfile.m │ │ ├── ccfile.cc │ │ ├── cppfile.cpp │ │ ├── cxxfile.cxx │ │ ├── mmfile.mm │ │ ├── ccfile_withcflags.cc │ │ ├── mmfile_withcflags.mm │ │ ├── cppfile_withcflags.cpp │ │ └── cxxfile_withcflags.cxx │ ├── swift-library │ │ └── file.swift │ ├── postbuild-static-library │ │ ├── empty.c │ │ └── postbuild-touch-file.sh │ ├── debuginfo │ │ └── file.c │ ├── postbuild-multiple-configurations │ │ ├── main.c │ │ └── postbuild-touch-file.sh │ ├── type_envvars │ │ └── file.c │ ├── infoplist-process │ │ └── main.c │ ├── postbuild-fail │ │ ├── postbuild-fail.sh │ │ ├── file.c │ │ ├── touch-dynamic.sh │ │ └── touch-static.sh │ ├── postbuild-defaults │ │ └── main.c │ ├── libtool-zero │ │ ├── mylib.c │ │ └── test.gyp │ ├── non-strs-flattened-to-env │ │ └── main.c │ ├── xcode-gcc │ │ ├── aliasing.cc │ │ ├── valid_c.c │ │ ├── warn_about_missing_newline.c │ │ ├── valid_cc.cc │ │ ├── valid_m.m │ │ └── valid_mm.mm │ ├── loadable-module-bundle-product-extension │ │ └── src.cc │ ├── framework-headers │ │ ├── myframework.m │ │ └── myframework.h │ ├── action-envvars │ │ └── action │ │ │ └── action.sh │ ├── clang-cxx-language-standard │ │ └── c++11.cc │ ├── loadable-module │ │ └── module.c │ └── clang-cxx-library │ │ ├── libc++.cc │ │ └── libstdc++.cc ├── rules │ └── src │ │ ├── somefile.ext │ │ ├── external │ │ ├── file1.in │ │ └── file2.in │ │ ├── noaction │ │ └── file1.in │ │ ├── subdir2 │ │ ├── file1.in │ │ ├── file2.in │ │ └── program.c │ │ ├── subdir1 │ │ ├── function1.in │ │ ├── function2.in │ │ └── program.c │ │ ├── subdir3 │ │ ├── function3.in │ │ └── program.c │ │ ├── an_asm.S │ │ ├── as.bat │ │ ├── subdir4 │ │ └── asm-function.assem │ │ ├── copy-file.py │ │ └── rule.py ├── sanitize-rule-names │ ├── blah.S │ ├── hello.cc │ └── script.py ├── actions-depfile │ └── input.txt ├── actions-none │ └── src │ │ ├── foo.cc │ │ └── fake_cross.py ├── android │ ├── file.in │ ├── hello.c │ ├── 32or64.c │ └── hello.gyp ├── copies │ └── src │ │ ├── file1 │ │ ├── file2 │ │ ├── directory │ │ ├── file3 │ │ ├── file4 │ │ └── subdir │ │ │ └── file5 │ │ ├── parentdir │ │ └── subdir │ │ │ └── file6 │ │ └── executable-file.sh ├── linux │ └── implicit-rpath │ │ ├── file.c │ │ └── main.c ├── no-cpp │ └── src │ │ ├── empty-main.c │ │ ├── call-f-main.c │ │ └── f.cc ├── actions-multiple │ └── src │ │ ├── input.txt │ │ ├── foo.c │ │ ├── copy.py │ │ └── filter.py ├── generator-output │ ├── copies │ │ ├── file1 │ │ ├── file2 │ │ ├── subdir │ │ │ ├── file3 │ │ │ ├── file4 │ │ │ ├── build │ │ │ │ └── README.txt │ │ │ └── copies-out │ │ │ │ └── README.txt │ │ ├── build │ │ │ └── README.txt │ │ └── copies-out │ │ │ └── README.txt │ ├── mac-bundle │ │ ├── app.order │ │ ├── header.h │ │ ├── main.c │ │ └── resource.sb │ ├── src │ │ ├── inc.h │ │ ├── inc1 │ │ │ └── include1.h │ │ ├── subdir2 │ │ │ ├── inc2 │ │ │ │ └── include2.h │ │ │ ├── deeper │ │ │ │ ├── deeper.h │ │ │ │ ├── deeper.c │ │ │ │ └── build │ │ │ │ │ └── README.txt │ │ │ └── build │ │ │ │ └── README.txt │ │ ├── subdir3 │ │ │ ├── inc3 │ │ │ │ └── include3.h │ │ │ └── build │ │ │ │ └── README.txt │ │ └── build │ │ │ └── README.txt │ ├── rules │ │ ├── subdir2 │ │ │ ├── file1.in0 │ │ │ ├── file2.in0 │ │ │ ├── file3.in1 │ │ │ ├── file4.in1 │ │ │ ├── build │ │ │ │ └── README.txt │ │ │ └── rules-out │ │ │ │ └── README.txt │ │ ├── subdir1 │ │ │ ├── define3.in0 │ │ │ ├── define4.in0 │ │ │ ├── function1.in1 │ │ │ ├── function2.in1 │ │ │ └── build │ │ │ │ └── README.txt │ │ ├── build │ │ │ └── README.txt │ │ └── copy-file.py │ └── actions │ │ ├── subdir1 │ │ ├── program.c │ │ ├── build │ │ │ └── README.txt │ │ └── actions-out │ │ │ └── README.txt │ │ ├── build │ │ └── README.txt │ │ └── subdir2 │ │ ├── build │ │ └── README.txt │ │ ├── actions-out │ │ └── README.txt │ │ └── make-file.py ├── external-cross-compile │ └── src │ │ ├── bogus2.c │ │ ├── test1.cc │ │ ├── test2.c │ │ ├── test3.cc │ │ ├── test4.c │ │ ├── bogus1.cc │ │ ├── tochar.py │ │ └── program.cc ├── include_dirs │ └── src │ │ ├── inc.h │ │ ├── subdir │ │ ├── inc.h │ │ ├── inc2 │ │ │ └── include2.h │ │ └── subdir_includes.c │ │ ├── inc1 │ │ └── include1.h │ │ ├── shadow1 │ │ └── shadow.h │ │ └── shadow2 │ │ └── shadow.h ├── rename │ └── filecase │ │ ├── file.c │ │ ├── test.gyp │ │ └── test-casesensitive.gyp ├── dependencies │ ├── b │ │ ├── b.c │ │ └── b3.c │ ├── c │ │ ├── d.c │ │ └── c.c │ ├── a.c │ ├── double_dependent.gyp │ ├── main.c │ └── lib_only.gyp ├── intermediate_dir │ └── src │ │ └── shared_infile.txt ├── variables │ ├── commands │ │ ├── test.py │ │ └── repeated_multidir │ │ │ ├── print_cwd_basename.py │ │ │ ├── dir_1 │ │ │ └── test_1.gyp │ │ │ └── dir_2 │ │ │ └── test_2.gyp │ ├── filelist │ │ ├── src │ │ │ └── dummy.py │ │ └── update_golden │ ├── variable-in-path │ │ └── C1 │ │ │ └── hello.cc │ └── latelate │ │ └── src │ │ └── program.cc ├── assembly │ └── src │ │ ├── lib1.c │ │ ├── as.bat │ │ ├── program.c │ │ ├── override_asm.asm │ │ └── lib1.S ├── make_global_settings │ └── full-toolchain │ │ ├── bar.cc │ │ ├── foo.c │ │ ├── my_nm.py │ │ └── my_readelf.py ├── ninja │ ├── s-needs-no-depfiles │ │ ├── empty.s │ │ └── s-needs-no-depfiles.gyp │ ├── solibs_avoid_relinking │ │ ├── main.cc │ │ └── solib.cc │ ├── chained-dependency │ │ └── chained.c │ ├── use-console │ │ └── foo.bar │ ├── normalize-paths-win │ │ └── hello.cc │ ├── use-custom-environment-files │ │ └── use-custom-environment-files.cc │ ├── action_dependencies │ │ └── src │ │ │ ├── a.c │ │ │ ├── c.c │ │ │ ├── b.h │ │ │ ├── a.h │ │ │ ├── c.h │ │ │ └── emit.py │ └── action-rule-hash │ │ └── subdir │ │ └── emit.py ├── rules-dirname │ └── src │ │ ├── subdir │ │ ├── a │ │ │ └── b │ │ │ │ ├── c.printvars │ │ │ │ └── c.gencc │ │ ├── foo │ │ │ └── bar │ │ │ │ ├── baz.printvars │ │ │ │ └── baz.gencc │ │ ├── nodir.gencc │ │ ├── printvars.py │ │ └── main.cc │ │ ├── copy-file.py │ │ └── actions.gyp ├── configurations │ ├── target_platform │ │ ├── left.c │ │ ├── right.c │ │ └── front.c │ ├── x64 │ │ └── configurations.c │ └── basics │ │ └── configurations.c ├── link-objects │ ├── extra.c │ └── base.c ├── home_dot_gyp │ ├── home │ │ └── .gyp │ │ │ └── include.gypi │ ├── home2 │ │ ├── .gyp │ │ │ └── include.gypi │ │ └── .gyp_new │ │ │ └── include.gypi │ └── src │ │ └── printfoo.c ├── library_dirs │ └── subdir │ │ ├── README.txt │ │ ├── mylib.cc │ │ ├── hello.cc │ │ └── mylib.h ├── builddir │ └── src │ │ ├── func1.c │ │ ├── func2.c │ │ ├── func3.c │ │ ├── func4.c │ │ ├── func5.c │ │ ├── prog1.c │ │ └── subdir2 │ │ ├── prog2.c │ │ └── subdir3 │ │ ├── prog3.c │ │ └── subdir4 │ │ ├── prog4.c │ │ └── subdir5 │ │ └── prog5.c ├── compilable │ └── src │ │ ├── lib1.hpp │ │ ├── lib1.cpp │ │ └── program.cpp ├── standalone-static-library │ ├── prog.c │ ├── mylib.c │ └── invalid.gyp ├── additional-targets │ └── src │ │ ├── dir1 │ │ ├── lib1.c │ │ └── emit.py │ │ └── all.gyp ├── same-source-file-name │ └── src │ │ ├── func.c │ │ ├── subdir1 │ │ └── func.c │ │ ├── subdir2 │ │ └── func.c │ │ ├── prog1.c │ │ └── prog2.c ├── sibling │ └── src │ │ ├── prog1 │ │ ├── prog1.c │ │ └── prog1.gyp │ │ ├── prog2 │ │ ├── prog2.c │ │ └── prog2.gyp │ │ └── build │ │ └── all.gyp ├── subdirectory │ └── src │ │ ├── prog1.c │ │ ├── subdir │ │ ├── prog2.c │ │ └── subdir2 │ │ │ └── prog3.c │ │ └── symroot.gypi ├── actions │ ├── generated-header │ │ ├── main.cc │ │ └── action.py │ └── src │ │ ├── subdir1 │ │ └── program.c │ │ └── subdir2 │ │ └── make-file.py ├── dependency-copy │ └── src │ │ ├── file1.c │ │ └── file2.c ├── same-gyp-name │ ├── src │ │ ├── subdir1 │ │ │ ├── main1.cc │ │ │ └── executable.gyp │ │ └── subdir2 │ │ │ ├── main2.cc │ │ │ └── executable.gyp │ └── library │ │ ├── one │ │ └── sub.gyp │ │ └── two │ │ └── sub.gyp ├── toplevel-dir │ └── src │ │ ├── sub1 │ │ └── prog1.c │ │ └── sub2 │ │ ├── prog2.c │ │ └── prog2.gyp ├── multiple-targets │ └── src │ │ ├── common.c │ │ ├── prog1.c │ │ └── prog2.c ├── rules-rebuild │ └── src │ │ ├── prog1.in │ │ ├── prog2.in │ │ └── main.c ├── link-dependency │ ├── main.c │ └── mymalloc.c ├── ios │ ├── app-bundle │ │ ├── TestApp │ │ │ ├── English.lproj │ │ │ │ ├── InfoPlist.strings │ │ │ │ └── InfoPlist-error.strings │ │ │ ├── Images.xcassets │ │ │ │ └── image.imageset │ │ │ │ │ ├── super_sylvain.png │ │ │ │ │ ├── super_sylvain@2x.png │ │ │ │ │ └── super_sylvain@3x.png │ │ │ ├── only-compile-in-32-bits.m │ │ │ └── only-compile-in-64-bits.m │ │ └── tool_main.cc │ ├── watch │ │ ├── WatchContainer │ │ │ ├── ViewController.h │ │ │ └── AppDelegate.h │ │ └── WatchKitExtension │ │ │ ├── InterfaceController.h │ │ │ └── Images.xcassets │ │ │ └── MyImage.imageset │ │ │ └── Contents.json │ └── extension │ │ ├── ActionExtension │ │ └── ActionViewController.h │ │ └── ExtensionContainer │ │ ├── ViewController.h │ │ └── AppDelegate.h ├── relative │ └── foo │ │ ├── b │ │ ├── b.gyp │ │ └── b.cc │ │ └── a │ │ ├── a.cc │ │ ├── c │ │ ├── c.cc │ │ └── c.gyp │ │ └── a.gyp ├── analyzer │ ├── common.gypi │ ├── subdir2 │ │ └── subdir.includes.gypi │ ├── test2.includes.includes.gypi │ ├── test2.includes.gypi │ ├── test2.toplevel_includes.gypi │ └── subdir │ │ └── subdir2 │ │ └── subdir2.gyp ├── module │ └── src │ │ ├── lib1.c │ │ └── lib2.c ├── msvs │ ├── buildevents │ │ └── main.cc │ ├── external_builder │ │ ├── hello.z │ │ ├── hello.cpp │ │ ├── msbuild_action.py │ │ ├── external_builder.py │ │ └── msbuild_rule.py │ ├── multiple_actions_error_handling │ │ ├── action_fail.py │ │ └── action_succeed.py │ ├── uldi2010 │ │ ├── hello2.c │ │ └── hello.c │ ├── props │ │ ├── hello.c │ │ └── AppName.vsprops │ ├── list_excluded │ │ ├── hello.cpp │ │ └── hello_mac.cpp │ ├── config_attrs │ │ └── hello.c │ ├── shared_output │ │ ├── hello.c │ │ └── there │ │ │ ├── there.c │ │ │ └── there.gyp │ └── missing_sources │ │ └── hello_missing.gyp ├── library │ └── src │ │ ├── lib1.c │ │ ├── lib2.c │ │ ├── lib1_moveable.c │ │ ├── lib2_moveable.c │ │ └── program.c ├── prune_targets │ ├── lib1.cc │ ├── lib2.cc │ ├── lib3.cc │ ├── lib_indirect.cc │ └── program.cc ├── errors │ ├── missing_targets.gyp │ ├── duplicate_targets.gyp │ ├── file_cycle1.gyp │ ├── duplicate_node.gyp │ └── missing_dep.gyp ├── compiler-override │ ├── my_cc.py │ ├── my_cxx.py │ ├── my_ld.py │ ├── my_nm.py │ ├── my_readelf.py │ ├── test.c │ ├── cxxtest.cc │ ├── compiler-exe.gyp │ └── compiler-shared-lib.gyp ├── target │ └── hello.c ├── hard_dependency │ └── src │ │ ├── a.c │ │ ├── b.c │ │ ├── d.c │ │ ├── c.h │ │ ├── c.c │ │ ├── b.h │ │ ├── a.h │ │ └── emit.py ├── rules-variables │ └── src │ │ ├── input_ext.c │ │ ├── input_name │ │ └── test.c │ │ ├── test.input_root.c │ │ ├── input_path │ │ └── subdir │ │ │ └── test.c │ │ └── subdir │ │ └── input_dirname.c ├── conditions │ └── elseif │ │ └── program.cc ├── hello │ ├── hello.c │ ├── hello2.c │ ├── hello.gyp │ └── hello2.gyp ├── gyp-defines │ └── echo.py ├── build-option │ ├── hello.c │ └── hello.gyp ├── toolsets │ ├── toolsets.cc │ ├── toolsets_shared.cc │ └── main.cc ├── standalone │ └── standalone.gyp ├── actions-bare │ └── src │ │ └── bare.py ├── defines-escaping │ └── defines-escaping.c ├── empty-target │ └── empty-target.gyp ├── same-rule-output-file-name │ └── src │ │ └── touch.py ├── actions-subdir │ └── src │ │ ├── make-file.py │ │ └── subdir │ │ └── make-subdir-file.py ├── same-target-name-different-directory │ └── src │ │ └── touch.py ├── cflags │ └── cflags.c ├── cxxflags │ ├── cxxflags.cc │ └── cxxflags.gyp ├── self-dependency │ ├── self_dependency.gyp │ └── common.gypi ├── custom-generator │ └── test.gyp ├── exclusion │ └── hello.c ├── product │ └── hello.c └── same-target-name │ └── src │ ├── executable1.gyp │ └── executable2.gyp ├── .gitignore ├── pylib └── gyp │ └── generator │ └── __init__.py ├── gyp.bat ├── samples └── samples.bat ├── gyp ├── tools ├── Xcode │ └── README └── emacs │ └── run-unit-tests.sh ├── AUTHORS └── codereview.settings /OWNERS: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /test/make/main.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /test/many-actions/file0: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/many-actions/file1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/many-actions/file2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/many-actions/file3: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/many-actions/file4: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/win/asm-files/b.s: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/win/asm-files/c.S: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/app-bundle/empty.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/framework/empty.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/rebuild/empty.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/rules/src/somefile.ext: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/win/command-quote/a.S: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/win/vs-macros/input.S: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pylib/gyp/generator/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/sanitize-rule-names/blah.S: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/postbuild-copy-bundle/empty.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/rpath/file.c: -------------------------------------------------------------------------------- 1 | void f() {} 2 | -------------------------------------------------------------------------------- /test/mac/xcode-env-order/file.ext1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/xcode-env-order/file.ext2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/xcode-env-order/file.ext3: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mac/xctest/resource.txt: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /test/win/system-include/bar/header.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/win/system-include/foo/header.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/actions-depfile/input.txt: -------------------------------------------------------------------------------- 1 | input 2 | -------------------------------------------------------------------------------- /test/actions-none/src/foo.cc: -------------------------------------------------------------------------------- 1 | foo.cc 2 | -------------------------------------------------------------------------------- /test/android/file.in: -------------------------------------------------------------------------------- 1 | A boring test file 2 | -------------------------------------------------------------------------------- /test/copies/src/file1: -------------------------------------------------------------------------------- 1 | file1 contents 2 | -------------------------------------------------------------------------------- /test/copies/src/file2: -------------------------------------------------------------------------------- 1 | file2 contents 2 | -------------------------------------------------------------------------------- /test/mac/rebuild/main.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/rpath/main.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/xcode-support-actions/source.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/win/batch-file-action/infile: -------------------------------------------------------------------------------- 1 | input 2 | -------------------------------------------------------------------------------- /test/win/compiler-flags/subdir/header.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/linux/implicit-rpath/file.c: -------------------------------------------------------------------------------- 1 | void f() {} 2 | -------------------------------------------------------------------------------- /test/mac/archs/empty_main.cc: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/archs/header.h: -------------------------------------------------------------------------------- 1 | typedef int MyInt; 2 | -------------------------------------------------------------------------------- /test/mac/bundle-resources/secret.txt: -------------------------------------------------------------------------------- 1 | abc 2 | -------------------------------------------------------------------------------- /test/mac/copy-dylib/empty.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/installname/main.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/ldflags-libtool/file.c: -------------------------------------------------------------------------------- 1 | void f() {} 2 | -------------------------------------------------------------------------------- /test/mac/objc-gc/c-file.c: -------------------------------------------------------------------------------- 1 | void c_fun() {} 2 | -------------------------------------------------------------------------------- /test/mac/objc-gc/cc-file.cc: -------------------------------------------------------------------------------- 1 | void cc_fun() {} 2 | -------------------------------------------------------------------------------- /test/mac/sourceless-module/empty.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /test/no-cpp/src/empty-main.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/win/system-include/common/commonheader.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/actions-multiple/src/input.txt: -------------------------------------------------------------------------------- 1 | hello there 2 | -------------------------------------------------------------------------------- /test/copies/src/directory/file3: -------------------------------------------------------------------------------- 1 | file3 contents 2 | -------------------------------------------------------------------------------- /test/copies/src/directory/file4: -------------------------------------------------------------------------------- 1 | file4 contents 2 | -------------------------------------------------------------------------------- /test/generator-output/copies/file1: -------------------------------------------------------------------------------- 1 | file1 contents 2 | -------------------------------------------------------------------------------- /test/generator-output/copies/file2: -------------------------------------------------------------------------------- 1 | file2 contents 2 | -------------------------------------------------------------------------------- /test/generator-output/mac-bundle/app.order: -------------------------------------------------------------------------------- 1 | _main 2 | -------------------------------------------------------------------------------- /test/linux/implicit-rpath/main.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/archs/file.mm: -------------------------------------------------------------------------------- 1 | MyInt f() { return 0; } 2 | -------------------------------------------------------------------------------- /test/mac/global-settings/src/dir2/file.txt: -------------------------------------------------------------------------------- 1 | File. 2 | -------------------------------------------------------------------------------- /test/mac/installname/file.c: -------------------------------------------------------------------------------- 1 | int f() { return 0; } 2 | -------------------------------------------------------------------------------- /test/mac/ldflags/subdirectory/symbol_list.def: -------------------------------------------------------------------------------- 1 | _f 2 | -------------------------------------------------------------------------------- /test/mac/objc-gc/needs-gc.m: -------------------------------------------------------------------------------- 1 | void objc_fun() { } 2 | -------------------------------------------------------------------------------- /test/mac/prefixheader/header.h: -------------------------------------------------------------------------------- 1 | typedef int MyInt; 2 | -------------------------------------------------------------------------------- /test/mac/sourceless-module/empty.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/win/vs-macros/stuff.blah: -------------------------------------------------------------------------------- 1 | Random data file. 2 | -------------------------------------------------------------------------------- /test/copies/src/directory/subdir/file5: -------------------------------------------------------------------------------- 1 | file5 contents 2 | -------------------------------------------------------------------------------- /test/copies/src/parentdir/subdir/file6: -------------------------------------------------------------------------------- 1 | file6 contents 2 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/bogus2.c: -------------------------------------------------------------------------------- 1 | From bogus2.c 2 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/test1.cc: -------------------------------------------------------------------------------- 1 | From test1.cc 2 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/test2.c: -------------------------------------------------------------------------------- 1 | From test2.c 2 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/test3.cc: -------------------------------------------------------------------------------- 1 | From test3.cc 2 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/test4.c: -------------------------------------------------------------------------------- 1 | From test4.c 2 | -------------------------------------------------------------------------------- /test/generator-output/mac-bundle/header.h: -------------------------------------------------------------------------------- 1 | int f(); 2 | -------------------------------------------------------------------------------- /test/generator-output/mac-bundle/main.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/include_dirs/src/inc.h: -------------------------------------------------------------------------------- 1 | #define INC_STRING "inc.h" 2 | -------------------------------------------------------------------------------- /test/mac/objc-gc/needs-gc-mm.mm: -------------------------------------------------------------------------------- 1 | void objcpp_fun() { } 2 | -------------------------------------------------------------------------------- /test/mac/prefixheader/file.c: -------------------------------------------------------------------------------- 1 | MyInt f() { return 0; } 2 | -------------------------------------------------------------------------------- /test/mac/prefixheader/file.cc: -------------------------------------------------------------------------------- 1 | MyInt f() { return 0; } 2 | -------------------------------------------------------------------------------- /test/mac/prefixheader/file.m: -------------------------------------------------------------------------------- 1 | MyInt f() { return 0; } 2 | -------------------------------------------------------------------------------- /test/mac/prefixheader/file.mm: -------------------------------------------------------------------------------- 1 | MyInt f() { return 0; } 2 | -------------------------------------------------------------------------------- /test/mac/unicode-settings/file.cc: -------------------------------------------------------------------------------- 1 | int main() { 2 | } 3 | -------------------------------------------------------------------------------- /test/rename/filecase/file.c: -------------------------------------------------------------------------------- 1 | int main() { return 0; } 2 | -------------------------------------------------------------------------------- /test/rules/src/external/file1.in: -------------------------------------------------------------------------------- 1 | Hello from file1.in 2 | -------------------------------------------------------------------------------- /test/rules/src/external/file2.in: -------------------------------------------------------------------------------- 1 | Hello from file2.in 2 | -------------------------------------------------------------------------------- /test/rules/src/noaction/file1.in: -------------------------------------------------------------------------------- 1 | Hello from file1.in 2 | -------------------------------------------------------------------------------- /test/rules/src/subdir2/file1.in: -------------------------------------------------------------------------------- 1 | Hello from file1.in 2 | -------------------------------------------------------------------------------- /test/rules/src/subdir2/file2.in: -------------------------------------------------------------------------------- 1 | Hello from file2.in 2 | -------------------------------------------------------------------------------- /test/dependencies/b/b.c: -------------------------------------------------------------------------------- 1 | int funcB() { 2 | return 2; 3 | } 4 | -------------------------------------------------------------------------------- /test/dependencies/c/d.c: -------------------------------------------------------------------------------- 1 | int funcD() { 2 | return 4; 3 | } 4 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/bogus1.cc: -------------------------------------------------------------------------------- 1 | From bogus1.cc 2 | -------------------------------------------------------------------------------- /test/generator-output/copies/subdir/file3: -------------------------------------------------------------------------------- 1 | file3 contents 2 | -------------------------------------------------------------------------------- /test/generator-output/copies/subdir/file4: -------------------------------------------------------------------------------- 1 | file4 contents 2 | -------------------------------------------------------------------------------- /test/generator-output/mac-bundle/resource.sb: -------------------------------------------------------------------------------- 1 | A text file. 2 | -------------------------------------------------------------------------------- /test/intermediate_dir/src/shared_infile.txt: -------------------------------------------------------------------------------- 1 | dummy input 2 | -------------------------------------------------------------------------------- /test/mac/depend-on-bundle/bundle.c: -------------------------------------------------------------------------------- 1 | int f() { return 42; } 2 | -------------------------------------------------------------------------------- /test/mac/missing-cfbundlesignature/file.c: -------------------------------------------------------------------------------- 1 | int main() {} 2 | -------------------------------------------------------------------------------- /test/mac/postbuild-copy-bundle/copied.txt: -------------------------------------------------------------------------------- 1 | old copied file 2 | -------------------------------------------------------------------------------- /test/mac/postbuilds/copy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cp "$@" 4 | -------------------------------------------------------------------------------- /test/mac/sourceless-module/fun.c: -------------------------------------------------------------------------------- 1 | int f() { return 42; } 2 | -------------------------------------------------------------------------------- /test/generator-output/src/inc.h: -------------------------------------------------------------------------------- 1 | #define INC_STRING "inc.h" 2 | -------------------------------------------------------------------------------- /test/mac/ldflags/subdirectory/file.c: -------------------------------------------------------------------------------- 1 | void f() {} 2 | void g() {} 3 | -------------------------------------------------------------------------------- /test/mac/strip/subdirectory/nested_file.c: -------------------------------------------------------------------------------- 1 | void nested_f() {} 2 | -------------------------------------------------------------------------------- /test/make/noload/lib/shared.h: -------------------------------------------------------------------------------- 1 | extern const char kSharedStr[]; 2 | -------------------------------------------------------------------------------- /test/no-cpp/src/call-f-main.c: -------------------------------------------------------------------------------- 1 | void* f(); 2 | int main() { f(); } 3 | -------------------------------------------------------------------------------- /test/variables/commands/test.py: -------------------------------------------------------------------------------- 1 | print "sample\\path\\foo.cpp" 2 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir2/file1.in0: -------------------------------------------------------------------------------- 1 | Hello from file1.in0 2 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir2/file2.in0: -------------------------------------------------------------------------------- 1 | Hello from file2.in0 2 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir2/file3.in1: -------------------------------------------------------------------------------- 1 | Hello from file3.in1 2 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir2/file4.in1: -------------------------------------------------------------------------------- 1 | Hello from file4.in1 2 | -------------------------------------------------------------------------------- /test/include_dirs/src/subdir/inc.h: -------------------------------------------------------------------------------- 1 | #define INC_STRING "subdir/inc.h" 2 | -------------------------------------------------------------------------------- /test/assembly/src/lib1.c: -------------------------------------------------------------------------------- 1 | int lib1_function(void) { 2 | return 42; 3 | } 4 | -------------------------------------------------------------------------------- /test/include_dirs/src/inc1/include1.h: -------------------------------------------------------------------------------- 1 | #define INCLUDE1_STRING "include1.h" 2 | -------------------------------------------------------------------------------- /test/win/rc-build/hello.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "resource.h" 4 | -------------------------------------------------------------------------------- /test/include_dirs/src/shadow1/shadow.h: -------------------------------------------------------------------------------- 1 | #define SHADOW_STRING "shadow1/shadow.h" 2 | -------------------------------------------------------------------------------- /test/include_dirs/src/shadow2/shadow.h: -------------------------------------------------------------------------------- 1 | #define SHADOW_STRING "shadow2/shadow.h" 2 | -------------------------------------------------------------------------------- /test/make_global_settings/full-toolchain/bar.cc: -------------------------------------------------------------------------------- 1 | #error Not a real source file 2 | -------------------------------------------------------------------------------- /test/make_global_settings/full-toolchain/foo.c: -------------------------------------------------------------------------------- 1 | #error Not a real source file 2 | -------------------------------------------------------------------------------- /test/ninja/s-needs-no-depfiles/empty.s: -------------------------------------------------------------------------------- 1 | # This file intentionally left blank. 2 | -------------------------------------------------------------------------------- /test/generator-output/src/inc1/include1.h: -------------------------------------------------------------------------------- 1 | #define INCLUDE1_STRING "inc1/include1.h" 2 | -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/a/b/c.printvars: -------------------------------------------------------------------------------- 1 | # Empty file for testing build rules 2 | -------------------------------------------------------------------------------- /test/win/rc-build/subdir/include.h: -------------------------------------------------------------------------------- 1 | // Just exists to make sure it can be included. 2 | -------------------------------------------------------------------------------- /test/copies/src/executable-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo echo echo echo cho ho o o 4 | -------------------------------------------------------------------------------- /test/mac/bundle-resources/change.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | tr a-z A-Z < "${1}" > "${2}" 4 | -------------------------------------------------------------------------------- /test/mac/depend-on-bundle/executable.c: -------------------------------------------------------------------------------- 1 | int f(); 2 | int main() { 3 | return f(); 4 | } 5 | -------------------------------------------------------------------------------- /test/mac/postbuild-copy-bundle/resource_file.sb: -------------------------------------------------------------------------------- 1 | This is included in the framework bundle. 2 | -------------------------------------------------------------------------------- /test/mac/sdkroot/file.cc: -------------------------------------------------------------------------------- 1 | #include 2 | using std::map; 3 | 4 | int main() { 5 | } 6 | -------------------------------------------------------------------------------- /test/no-cpp/src/f.cc: -------------------------------------------------------------------------------- 1 | extern "C" { void* f(); } 2 | 3 | void* f() { return new int; } 4 | -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/foo/bar/baz.printvars: -------------------------------------------------------------------------------- 1 | # Empty file for testing build rules 2 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir1/define3.in0: -------------------------------------------------------------------------------- 1 | #define STRING3 "Hello from define3.in0\n" 2 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir1/define4.in0: -------------------------------------------------------------------------------- 1 | #define STRING4 "Hello from define4.in0\n" 2 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir2/inc2/include2.h: -------------------------------------------------------------------------------- 1 | #define INCLUDE2_STRING "inc2/include2.h" 2 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir3/inc3/include3.h: -------------------------------------------------------------------------------- 1 | #define INCLUDE3_STRING "inc3/include3.h" 2 | -------------------------------------------------------------------------------- /test/include_dirs/src/subdir/inc2/include2.h: -------------------------------------------------------------------------------- 1 | #define INCLUDE2_STRING "subdir/inc2/include2.h" 2 | -------------------------------------------------------------------------------- /test/assembly/src/as.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: Mock windows assembler. 3 | cl /MD /c %1 /Fo"%2" 4 | 5 | -------------------------------------------------------------------------------- /test/configurations/target_platform/left.c: -------------------------------------------------------------------------------- 1 | const char *message(void) { 2 | return "left"; 3 | } 4 | -------------------------------------------------------------------------------- /test/configurations/target_platform/right.c: -------------------------------------------------------------------------------- 1 | const char *message(void) { 2 | return "right"; 3 | } 4 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir2/deeper/deeper.h: -------------------------------------------------------------------------------- 1 | #define DEEPER_STRING "subdir2/deeper/deeper.h" 2 | -------------------------------------------------------------------------------- /test/link-objects/extra.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void extra() { 4 | printf("PASS\n"); 5 | } 6 | -------------------------------------------------------------------------------- /test/mac/bundle-resources/executable-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo echo echo echo cho ho o o 4 | -------------------------------------------------------------------------------- /test/mac/postbuilds/subdirectory/copied_file.txt: -------------------------------------------------------------------------------- 1 | This file should be copied to the products dir. 2 | -------------------------------------------------------------------------------- /test/make/noload/lib/shared.c: -------------------------------------------------------------------------------- 1 | #include "shared.h" 2 | 3 | const char kSharedStr[] = "shared.c"; 4 | -------------------------------------------------------------------------------- /test/link-objects/base.c: -------------------------------------------------------------------------------- 1 | void extra(); 2 | 3 | int main(void) { 4 | extra(); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /test/mac/depend-on-bundle/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | -------------------------------------------------------------------------------- /test/win/rc-build/hello.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/win/rc-build/hello.ico -------------------------------------------------------------------------------- /test/win/rc-build/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/win/rc-build/small.ico -------------------------------------------------------------------------------- /test/win/system-include/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() {} 5 | -------------------------------------------------------------------------------- /test/home_dot_gyp/home/.gyp/include.gypi: -------------------------------------------------------------------------------- 1 | { 2 | 'variables': { 3 | 'foo': '"fromhome"', 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /test/home_dot_gyp/home2/.gyp/include.gypi: -------------------------------------------------------------------------------- 1 | { 2 | 'variables': { 3 | 'foo': '"fromhome2"', 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /test/ninja/solibs_avoid_relinking/main.cc: -------------------------------------------------------------------------------- 1 | extern int foo(); 2 | 3 | int main() { 4 | return foo(); 5 | } 6 | -------------------------------------------------------------------------------- /test/home_dot_gyp/home2/.gyp_new/include.gypi: -------------------------------------------------------------------------------- 1 | { 2 | 'variables': { 3 | 'foo': '"fromhome3"', 4 | }, 5 | } 6 | -------------------------------------------------------------------------------- /test/library_dirs/subdir/README.txt: -------------------------------------------------------------------------------- 1 | Make things live in a subdirectory, to make sure that DEPTH works correctly. 2 | -------------------------------------------------------------------------------- /test/mac/framework/TestFramework/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /test/mac/libraries/subdir/README.txt: -------------------------------------------------------------------------------- 1 | Make things live in a subdirectory, to make sure that DEPTH works correctly. 2 | -------------------------------------------------------------------------------- /test/ninja/chained-dependency/chained.c: -------------------------------------------------------------------------------- 1 | #include "generated/header.h" 2 | 3 | int main(void) { 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /test/builddir/src/func1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void func1(void) 4 | { 5 | printf("Hello from func1.c\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/builddir/src/func2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void func2(void) 4 | { 5 | printf("Hello from func2.c\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/builddir/src/func3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void func3(void) 4 | { 5 | printf("Hello from func3.c\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/builddir/src/func4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void func4(void) 4 | { 5 | printf("Hello from func4.c\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/builddir/src/func5.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void func5(void) 4 | { 5 | printf("Hello from func5.c\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/compilable/src/lib1.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _lib1_hpp 2 | #define _lib1_hpp 3 | 4 | extern void lib1_function(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /test/mac/rebuild/delay-touch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | sleep 1 # mtime resolution is 1 sec on unix. 6 | touch "$1" 7 | -------------------------------------------------------------------------------- /test/standalone-static-library/prog.c: -------------------------------------------------------------------------------- 1 | extern void print(void); 2 | 3 | int main(void) 4 | { 5 | print(); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/additional-targets/src/dir1/lib1.c: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | __declspec(dllexport) 3 | #endif 4 | int func1(void) { 5 | return 42; 6 | } 7 | -------------------------------------------------------------------------------- /test/home_dot_gyp/src/printfoo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("FOO is %s\n", FOO); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/objc-arc/c-file.c: -------------------------------------------------------------------------------- 1 | #if __has_feature(objc_arc) 2 | #error "C files shouldn't be ARC'd!" 3 | #endif 4 | 5 | void c_fun() {} 6 | 7 | -------------------------------------------------------------------------------- /test/mac/objc-arc/cc-file.cc: -------------------------------------------------------------------------------- 1 | #if __has_feature(objc_arc) 2 | #error "C++ files shouldn't be ARC'd!" 3 | #endif 4 | 5 | void cc_fun() {} 6 | -------------------------------------------------------------------------------- /test/rules/src/subdir1/function1.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function1(void) 4 | { 5 | printf("Hello from function1.in\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/rules/src/subdir1/function2.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function2(void) 4 | { 5 | printf("Hello from function2.in\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/same-source-file-name/src/func.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void func(void) 4 | { 5 | printf("Hello %s from func.c\n", PROG); 6 | } 7 | -------------------------------------------------------------------------------- /test/sibling/src/prog1/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog1.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/sibling/src/prog2/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/subdirectory/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog1.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/actions/generated-header/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "MyHeader.h" 4 | 5 | int main() { 6 | printf("%s\n", kFoo); 7 | } 8 | -------------------------------------------------------------------------------- /test/dependency-copy/src/file1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from file1.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/dependency-copy/src/file2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from file2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/strip/subdirectory/test_reading_save_file_from_postbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | test -f ${CHROMIUM_STRIP_SAVE_FILE} 6 | -------------------------------------------------------------------------------- /test/same-gyp-name/src/subdir1/main1.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | printf("Hello from main1.cc\n"); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /test/same-gyp-name/src/subdir2/main2.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | printf("Hello from main2.cc\n"); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /test/toplevel-dir/src/sub1/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog1.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/toplevel-dir/src/sub2/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/variables/filelist/src/dummy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | 5 | open(sys.argv[1], 'w').write(open(sys.argv[2]).read()) 6 | -------------------------------------------------------------------------------- /test/mac/cflags/cfile.c: -------------------------------------------------------------------------------- 1 | #ifndef CFLAG 2 | #error CFLAG should be set 3 | #endif 4 | 5 | #ifdef CCFLAG 6 | #error CCFLAG should not be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/cflags/mfile.m: -------------------------------------------------------------------------------- 1 | #ifndef CFLAG 2 | #error CFLAG should be set 3 | #endif 4 | 5 | #ifdef CCFLAG 6 | #error CCFLAG should not be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/multiple-targets/src/common.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void common(void) 4 | { 5 | printf("hello from common.c\n"); 6 | return; 7 | } 8 | -------------------------------------------------------------------------------- /test/standalone-static-library/mylib.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void print(void) 4 | { 5 | printf("hello from mylib.c\n"); 6 | return; 7 | } 8 | -------------------------------------------------------------------------------- /test/subdirectory/src/subdir/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir1/function1.in1: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function1(void) 4 | { 5 | printf("Hello from function1.in1\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir1/function2.in1: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void function2(void) 4 | { 5 | printf("Hello from function2.in1\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/mac/cflags/ccfile.cc: -------------------------------------------------------------------------------- 1 | #ifdef CFLAG 2 | #error CFLAG should not be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/cflags/cppfile.cpp: -------------------------------------------------------------------------------- 1 | #ifdef CFLAG 2 | #error CFLAG should not be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/cflags/cxxfile.cxx: -------------------------------------------------------------------------------- 1 | #ifdef CFLAG 2 | #error CFLAG should not be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/cflags/mmfile.mm: -------------------------------------------------------------------------------- 1 | #ifdef CFLAG 2 | #error CFLAG should not be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/rules-rebuild/src/prog1.in: -------------------------------------------------------------------------------- 1 | #include 2 | #include "prog1.h" 3 | 4 | void prog1(void) 5 | { 6 | printf("Hello from %s!\n", NAME); 7 | } 8 | -------------------------------------------------------------------------------- /test/rules-rebuild/src/prog2.in: -------------------------------------------------------------------------------- 1 | #include 2 | #include "prog2.h" 3 | 4 | void prog2(void) 5 | { 6 | printf("Hello from %s!\n", NAME); 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/src/subdir3/function3.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" void function3(void) 4 | { 5 | printf("Hello from function3.in\n"); 6 | } 7 | -------------------------------------------------------------------------------- /test/subdirectory/src/subdir/subdir2/prog3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from prog3.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir2/deeper/deeper.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | printf("Hello from deeper.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/cflags/ccfile_withcflags.cc: -------------------------------------------------------------------------------- 1 | #ifndef CFLAG 2 | #error CFLAG should be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/cflags/mmfile_withcflags.mm: -------------------------------------------------------------------------------- 1 | #ifndef CFLAG 2 | #error CFLAG should be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/objc-arc/m-file.m: -------------------------------------------------------------------------------- 1 | #if !__has_feature(objc_arc) 2 | #error "ObjC files with CLANG_ENABLE_OBJC_ARC should be ARC'd!" 3 | #endif 4 | 5 | void m_fun() {} 6 | -------------------------------------------------------------------------------- /test/dependencies/c/c.c: -------------------------------------------------------------------------------- 1 | int funcC() { 2 | return 3 3 | // Intentional syntax error. This file should never be compiled, so this 4 | // shouldn't be a problem. 5 | -------------------------------------------------------------------------------- /test/link-dependency/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() { 4 | void *p = malloc(1); 5 | printf("p: %p\n", p); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/mac/app-bundle/TestApp/English.lproj/utf-16be.strings -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/mac/app-bundle/TestApp/English.lproj/utf-16le.strings -------------------------------------------------------------------------------- /test/mac/cflags/cppfile_withcflags.cpp: -------------------------------------------------------------------------------- 1 | #ifndef CFLAG 2 | #error CFLAG should be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/cflags/cxxfile_withcflags.cxx: -------------------------------------------------------------------------------- 1 | #ifndef CFLAG 2 | #error CFLAG should be set 3 | #endif 4 | 5 | #ifndef CCFLAG 6 | #error CCFLAG should be set 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/objc-arc/mm-file.mm: -------------------------------------------------------------------------------- 1 | #if !__has_feature(objc_arc) 2 | #error "ObjC++ files with CLANG_ENABLE_OBJC_ARC should be ARC'd!" 3 | #endif 4 | 5 | void mm_fun() {} 6 | -------------------------------------------------------------------------------- /test/same-source-file-name/src/subdir1/func.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void subdir1_func(void) 4 | { 5 | printf("Hello %s from subdir1/func.c\n", PROG); 6 | } 7 | -------------------------------------------------------------------------------- /test/same-source-file-name/src/subdir2/func.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void subdir2_func(void) 4 | { 5 | printf("Hello %s from subdir2/func.c\n", PROG); 6 | } 7 | -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/a/b/c.gencc: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | #include 3 | 4 | namespace gen { 5 | void c() { 6 | printf("hi c\n"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "Copyright ©2011 Google Inc."; 4 | -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "Copyright ©2011 Google Inc."; 4 | -------------------------------------------------------------------------------- /test/mac/objc-arc/m-file-no-arc.m: -------------------------------------------------------------------------------- 1 | #if __has_feature(objc_arc) 2 | #error "ObjC files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!" 3 | #endif 4 | 5 | void m_fun() {} 6 | -------------------------------------------------------------------------------- /test/configurations/target_platform/front.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const char *message(void); 4 | 5 | int main(void) { 6 | printf("%s\n", message()); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/English.lproj/InfoPlist-error.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "Copyright ©2011 Google Inc." 4 | -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/English.lproj/InfoPlist-error.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | NSHumanReadableCopyright = "Copyright ©2011 Google Inc." 4 | -------------------------------------------------------------------------------- /test/mac/objc-arc/mm-file-no-arc.mm: -------------------------------------------------------------------------------- 1 | #if __has_feature(objc_arc) 2 | #error "ObjC++ files without CLANG_ENABLE_OBJC_ARC should not be ARC'd!" 3 | #endif 4 | 5 | void mm_fun() {} 6 | -------------------------------------------------------------------------------- /test/mac/objc-gc/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main() { 4 | printf("gc on: %d\n", [NSGarbageCollector defaultCollector] != NULL); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /test/mac/swift-library/file.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public class GypSwiftTest { 4 | let myProperty = false 5 | 6 | init() { 7 | self.myProperty = true 8 | } 9 | } -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/nodir.gencc: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | #include 3 | 4 | namespace gen { 5 | void nodir() { 6 | printf("no dir here\n"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/compilable/src/lib1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "lib1.hpp" 3 | 4 | void lib1_function(void) { 5 | fprintf(stdout, "Hello from lib1.c\n"); 6 | fflush(stdout); 7 | } 8 | -------------------------------------------------------------------------------- /test/make/noload/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "lib/shared.h" 4 | 5 | int main(void) 6 | { 7 | printf("Hello from %s.\n", kSharedStr); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/foo/bar/baz.gencc: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | #include 3 | 4 | namespace gen { 5 | void baz() { 6 | printf("hello baz\n"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/win/ml-safeseh/a.asm: -------------------------------------------------------------------------------- 1 | .MODEL FLAT, C 2 | .CODE 3 | 4 | PUBLIC zero 5 | zero PROC 6 | xor eax, eax 7 | ret 0 8 | zero ENDP 9 | 10 | END 11 | -------------------------------------------------------------------------------- /test/ninja/solibs_avoid_relinking/solib.cc: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | __declspec(dllexport) 3 | #else 4 | __attribute__((visibility("default"))) 5 | #endif 6 | int foo() { 7 | return 42; 8 | } 9 | -------------------------------------------------------------------------------- /test/relative/foo/b/b.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'targets': [ 3 | { 4 | 'target_name': 'b', 5 | 'type': 'static_library', 6 | 'sources': ['b.cc'], 7 | }, 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /test/builddir/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func1(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from prog1.c\n"); 8 | func1(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/linker-flags/safeseh_zero.asm: -------------------------------------------------------------------------------- 1 | .MODEL FLAT, C 2 | .CODE 3 | 4 | PUBLIC zero 5 | zero PROC 6 | xor eax, eax 7 | ret 0 8 | zero ENDP 9 | 10 | END 11 | -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain.png -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/ios/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@2x.png -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svn2github/gyp/HEAD/test/mac/app-bundle/TestApp/Images.xcassets/image.imageset/super_sylvain@3x.png -------------------------------------------------------------------------------- /test/multiple-targets/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void common(void); 4 | 5 | int main(void) 6 | { 7 | printf("hello from prog1.c\n"); 8 | common(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/multiple-targets/src/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void common(void); 4 | 5 | int main(void) 6 | { 7 | printf("hello from prog2.c\n"); 8 | common(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/analyzer/common.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | } 7 | -------------------------------------------------------------------------------- /test/mac/postbuilds/file.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | void f() {} 5 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func2(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from subdir2/prog2.c\n"); 8 | func2(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/mac/archs/my_file.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | int x = 1; 5 | -------------------------------------------------------------------------------- /test/mac/postbuilds/file_g.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | void g() {} 5 | -------------------------------------------------------------------------------- /test/mac/postbuilds/file_h.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | void h() {} 5 | -------------------------------------------------------------------------------- /test/rules/src/subdir3/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void function3(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from program.c\n"); 8 | function3(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/lib-flags/answer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int answer(); -------------------------------------------------------------------------------- /test/module/src/lib1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef _WIN32 4 | __declspec(dllexport) 5 | #endif 6 | void module_main(void) 7 | { 8 | fprintf(stdout, "Hello from lib1.c\n"); 9 | fflush(stdout); 10 | } 11 | -------------------------------------------------------------------------------- /test/module/src/lib2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef _WIN32 4 | __declspec(dllexport) 5 | #endif 6 | void module_main(void) 7 | { 8 | fprintf(stdout, "Hello from lib2.c\n"); 9 | fflush(stdout); 10 | } 11 | -------------------------------------------------------------------------------- /test/msvs/buildevents/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() {} 6 | -------------------------------------------------------------------------------- /gyp.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright (c) 2009 Google Inc. All rights reserved. 2 | @rem Use of this source code is governed by a BSD-style license that can be 3 | @rem found in the LICENSE file. 4 | 5 | @python "%~dp0gyp_main.py" %* 6 | -------------------------------------------------------------------------------- /test/library/src/lib1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef _WIN32 4 | __declspec(dllexport) 5 | #endif 6 | void lib1_function(void) 7 | { 8 | fprintf(stdout, "Hello from lib1.c\n"); 9 | fflush(stdout); 10 | } 11 | -------------------------------------------------------------------------------- /test/library/src/lib2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef _WIN32 4 | __declspec(dllexport) 5 | #endif 6 | void lib2_function(void) 7 | { 8 | fprintf(stdout, "Hello from lib2.c\n"); 9 | fflush(stdout); 10 | } 11 | -------------------------------------------------------------------------------- /test/mac/postbuild-copy-bundle/main.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | int main() {} 5 | -------------------------------------------------------------------------------- /test/mac/postbuild-static-library/empty.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | void f() {} 5 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/subdir3/prog3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func3(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from subdir2/subdir3/prog3.c\n"); 8 | func3(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/compilable/src/program.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "lib1.hpp" 3 | 4 | int main(void) { 5 | fprintf(stdout, "Hello from program.c\n"); 6 | fflush(stdout); 7 | lib1_function(); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/prune_targets/lib1.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void libfunc1() { 6 | } 7 | -------------------------------------------------------------------------------- /test/prune_targets/lib2.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void libfunc2() { 6 | } 7 | -------------------------------------------------------------------------------- /test/prune_targets/lib3.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void libfunc3() { 6 | } 7 | -------------------------------------------------------------------------------- /samples/samples.bat: -------------------------------------------------------------------------------- 1 | @rem Copyright (c) 2009 Google Inc. All rights reserved. 2 | @rem Use of this source code is governed by a BSD-style license that can be 3 | @rem found in the LICENSE file. 4 | 5 | @python %~dp0/samples %* 6 | -------------------------------------------------------------------------------- /test/mac/debuginfo/file.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void f() {} 6 | int main() {} 7 | -------------------------------------------------------------------------------- /test/mac/postbuild-multiple-configurations/main.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | int main() {} 5 | -------------------------------------------------------------------------------- /test/mac/type_envvars/file.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void f() {} 6 | int main() {} 7 | -------------------------------------------------------------------------------- /test/win/linker-flags/x.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int x() { 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/y.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int y() { 6 | return 2; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/z.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int z() { 6 | return 3; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/shard/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/shard/hello1.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int f1() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/shard/hello2.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int f2() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/shard/hello3.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int f3() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/shard/hello4.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int f4() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/framework/TestFramework/TestFramework_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'TestFramework' target in the 'TestFramework' project. 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /test/rules/src/an_asm.S: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Fake asm file. 6 | int main() {} 7 | -------------------------------------------------------------------------------- /test/win/asm-files/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/command-quote/go.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: Copyright (c) 2012 Google Inc. All rights reserved. 4 | :: Use of this source code is governed by a BSD-style license that can be 5 | :: found in the LICENSE file. 6 | 7 | copy %1 %2 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/a/x.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int x() { 6 | return 1; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/a/z.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int z() { 6 | return 3; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/b/y.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int y() { 6 | return 2; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/uldi/a.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int some_function() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/uldi/b.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int some_function() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/vs-macros/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/subdir3/subdir4/prog4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func4(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from subdir2/subdir3/subdir4/prog4.c\n"); 8 | func4(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/ios/app-bundle/tool_main.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/library/src/lib1_moveable.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef _WIN32 4 | __declspec(dllexport) 5 | #endif 6 | void moveable_function(void) 7 | { 8 | fprintf(stdout, "Hello from lib1_moveable.c\n"); 9 | fflush(stdout); 10 | } 11 | -------------------------------------------------------------------------------- /test/library/src/lib2_moveable.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef _WIN32 4 | __declspec(dllexport) 5 | #endif 6 | void moveable_function(void) 7 | { 8 | fprintf(stdout, "Hello from lib2_moveable.c\n"); 9 | fflush(stdout); 10 | } 11 | -------------------------------------------------------------------------------- /test/mac/infoplist-process/main.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/postbuild-fail/postbuild-fail.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | # Copyright (c) 2011 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | exit 1 7 | -------------------------------------------------------------------------------- /test/mac/xcode-env-order/main.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/prune_targets/lib_indirect.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void libfunc_indirect() { 6 | } 7 | -------------------------------------------------------------------------------- /test/prune_targets/program.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/rules-rebuild/src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void prog1(void); 4 | extern void prog2(void); 5 | 6 | int main(void) 7 | { 8 | printf("Hello from main.c\n"); 9 | prog1(); 10 | prog2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/sanitize-rule-names/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/compiler-flags/calling-convention-cdecl.def: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2014 Google Inc. All rights reserved. 2 | ; Use of this source code is governed by a BSD-style license that can be 3 | ; found in the LICENSE file. 4 | 5 | EXPORTS 6 | foo 7 | -------------------------------------------------------------------------------- /test/win/compiler-flags/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/idl-excluded/program.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/idl-includedirs/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/large-pdb/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main(void) { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/errors/missing_targets.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'target_defaults': { 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /test/mac/postbuild-defaults/main.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/ninja/use-console/foo.bar: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | This is a dummy file for rule/action input. 6 | -------------------------------------------------------------------------------- /test/win/command-quote/bat with spaces.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: Copyright (c) 2012 Google Inc. All rights reserved. 4 | :: Use of this source code is governed by a BSD-style license that can be 5 | :: found in the LICENSE file. 6 | 7 | copy %1 %2 8 | -------------------------------------------------------------------------------- /test/win/compiler-flags/calling-convention-fastcall.def: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2014 Google Inc. All rights reserved. 2 | ; Use of this source code is governed by a BSD-style license that can be 3 | ; found in the LICENSE file. 4 | 5 | EXPORTS 6 | @foo@0 7 | -------------------------------------------------------------------------------- /test/win/compiler-flags/calling-convention-stdcall.def: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2014 Google Inc. All rights reserved. 2 | ; Use of this source code is governed by a BSD-style license that can be 3 | ; found in the LICENSE file. 4 | 5 | EXPORTS 6 | _foo@0 7 | -------------------------------------------------------------------------------- /test/win/long-command-line/function.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int func() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/long-command-line/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/libtool-zero/mylib.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int my_foo(int x) { 6 | return x + 1; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/non-strs-flattened-to-env/main.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/aliasing.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void check(int* h, long* k) { 4 | *h = 1; 5 | *k = 0; 6 | printf("%d\n", *h); 7 | } 8 | 9 | int main(void) { 10 | long k; 11 | check((int*)&k, &k); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/ninja/normalize-paths-win/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/variables/variable-in-path/C1/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/compiler-flags/calling-convention-vectorcall.def: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2014 Google Inc. All rights reserved. 2 | ; Use of this source code is governed by a BSD-style license that can be 3 | ; found in the LICENSE file. 4 | 5 | EXPORTS 6 | foo@@0 7 | -------------------------------------------------------------------------------- /test/win/compiler-flags/calling-convention.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | extern "C" void foo() { 6 | } 7 | -------------------------------------------------------------------------------- /test/win/compiler-flags/pdbname.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int some_function() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/compiler-flags/precomp.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | #include 7 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func5(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\n"); 8 | func5(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/compiler-override/my_cc.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | -------------------------------------------------------------------------------- /test/compiler-override/my_cxx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | -------------------------------------------------------------------------------- /test/compiler-override/my_ld.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | -------------------------------------------------------------------------------- /test/mac/libraries/subdir/mylib.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int my_foo(int x) { 6 | return x + 1; 7 | } 8 | -------------------------------------------------------------------------------- /test/msvs/external_builder/hello.z: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | This file will be passed to the test rule. 6 | 7 | -------------------------------------------------------------------------------- /test/target/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | void main(void) { 6 | printf("Hello, world!\n"); 7 | } 8 | -------------------------------------------------------------------------------- /test/actions/src/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void prog1(void); 4 | extern void prog2(void); 5 | 6 | int main(void) 7 | { 8 | printf("Hello from program.c\n"); 9 | prog1(); 10 | prog2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/dependencies/b/b3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | int funcB() { 8 | return 3; 9 | } 10 | -------------------------------------------------------------------------------- /test/mac/archs/file_a.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "file_a.h" 6 | 7 | void DependentFunctionA() { 8 | } 9 | -------------------------------------------------------------------------------- /test/mac/archs/file_b.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "file_b.h" 6 | 7 | void DependentFunctionB() { 8 | } 9 | -------------------------------------------------------------------------------- /test/mac/postbuild-fail/file.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // That's right, this is copyrighted. 6 | void f() {} 7 | -------------------------------------------------------------------------------- /test/mac/xctest/MyClass.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import "MyClass.h" 6 | 7 | @implementation MyClass 8 | @end 9 | -------------------------------------------------------------------------------- /test/msvs/multiple_actions_error_handling/action_fail.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import sys 6 | 7 | sys.exit(1) 8 | -------------------------------------------------------------------------------- /test/msvs/multiple_actions_error_handling/action_succeed.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import sys 6 | 7 | sys.exit(0) 8 | -------------------------------------------------------------------------------- /test/relative/foo/a/a.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | int main() { 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/relative/foo/a/c/c.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | int func() { 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/relative/foo/b/b.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | int func2() { 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/mac/strip/strip.saves: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This file would list symbols that should not be stripped. 6 | -------------------------------------------------------------------------------- /test/relative/foo/a/c/c.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'targets': [ 3 | { 4 | 'target_name': 'c', 5 | 'type': 'static_library', 6 | 'sources': ['c.cc'], 7 | 'dependencies': [ 8 | '../../b/b.gyp:b', 9 | ], 10 | }, 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/src/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void function1(void); 4 | extern void function2(void); 5 | 6 | int main(void) 7 | { 8 | printf("Hello from program.c\n"); 9 | function1(); 10 | function2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/win/linker-flags/inline_test.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | bool IsFunctionInlined(void* current_return_address); 6 | -------------------------------------------------------------------------------- /gyp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2013 The Chromium Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | set -e 7 | base=$(dirname "$0") 8 | exec python "${base}/gyp_main.py" "$@" 9 | -------------------------------------------------------------------------------- /test/mac/loadable-module-bundle-product-extension/src.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int test() { 6 | return 1337; 7 | } 8 | -------------------------------------------------------------------------------- /test/rules/src/as.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: Copyright (c) 2011 Google Inc. All rights reserved. 3 | :: Use of this source code is governed by a BSD-style license that can be 4 | :: found in the LICENSE file. 5 | 6 | :: Fake assembler for Windows 7 | cl /TP /c %1 /Fo%2 8 | -------------------------------------------------------------------------------- /test/win/linker-flags/library-directories-define.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int library_function() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/analyzer/subdir2/subdir.includes.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'sources': [ 7 | 'd.cc' 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /test/analyzer/test2.includes.includes.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'sources': [ 7 | 'c.cc' 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void prog1(void); 4 | extern void prog2(void); 5 | 6 | int main(void) 7 | { 8 | printf("Hello from program.c\n"); 9 | prog1(); 10 | prog2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/hard_dependency/src/a.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include "a.h" 6 | 7 | int funcA() { 8 | return 42; 9 | } 10 | -------------------------------------------------------------------------------- /test/win/linker-flags/deffile.def: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2012 Google Inc. All rights reserved. 2 | ; Use of this source code is governed by a BSD-style license that can be 3 | ; found in the LICENSE file. 4 | 5 | LIBRARY test_deffile_ok 6 | 7 | EXPORTS 8 | AnExportedFunction 9 | -------------------------------------------------------------------------------- /test/dependencies/a.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | extern int funcB(); 6 | 7 | int funcA() { 8 | return funcB(); 9 | } 10 | -------------------------------------------------------------------------------- /test/hard_dependency/src/b.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include "a.h" 6 | 7 | int funcB() { 8 | return funcA(); 9 | } 10 | -------------------------------------------------------------------------------- /test/hard_dependency/src/d.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include "c.h" 6 | 7 | int funcD() { 8 | return funcC(); 9 | } 10 | -------------------------------------------------------------------------------- /test/mac/postbuild-fail/touch-dynamic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2011 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | set -e 7 | touch "${BUILT_PRODUCTS_DIR}/dynamic_touch" 8 | -------------------------------------------------------------------------------- /test/mac/postbuild-fail/touch-static.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2011 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | set -e 7 | touch "${BUILT_PRODUCTS_DIR}/static_touch" 8 | -------------------------------------------------------------------------------- /test/mac/postbuild-static-library/postbuild-touch-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | touch "${BUILT_PRODUCTS_DIR}/$1" 8 | -------------------------------------------------------------------------------- /test/mac/unicode-settings/test_bundle_display_name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright 2013 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | test "${BUNDLE_DISPLAY_NAME}" = 'α ' 8 | -------------------------------------------------------------------------------- /test/mac/xctest/MyClass.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface MyClass : NSObject 8 | @end 9 | -------------------------------------------------------------------------------- /test/ninja/use-custom-environment-files/use-custom-environment-files.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/win/lib-flags/answer.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "answer.h" 6 | 7 | int answer() { 8 | return 42; 9 | } 10 | -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/only-compile-in-32-bits.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #if defined(__LP64__) 6 | # error 64-bit build 7 | #endif 8 | -------------------------------------------------------------------------------- /test/ios/app-bundle/TestApp/only-compile-in-64-bits.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #if !defined(__LP64__) 6 | # error 32-bit build 7 | #endif 8 | -------------------------------------------------------------------------------- /test/mac/framework-headers/myframework.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import "myframework.h" 6 | 7 | @implementation TestObject 8 | @end 9 | -------------------------------------------------------------------------------- /test/mac/strip/subdirectory/nested_strip.saves: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # This file would list symbols that should not be stripped. 6 | -------------------------------------------------------------------------------- /test/rules/src/subdir4/asm-function.assem: -------------------------------------------------------------------------------- 1 | #if PLATFORM_WINDOWS || PLATFORM_MAC 2 | # define IDENTIFIER(n) _##n 3 | #else /* Linux */ 4 | # define IDENTIFIER(n) n 5 | #endif 6 | 7 | .globl IDENTIFIER(asm_function) 8 | IDENTIFIER(asm_function): 9 | movl $41, %eax 10 | ret 11 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/a.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "a.h" 7 | 8 | int funcA() { 9 | return 42; 10 | } 11 | -------------------------------------------------------------------------------- /test/relative/foo/a/a.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'targets': [ 3 | { 4 | 'target_name': 'a', 5 | 'type': 'executable', 6 | 'sources': ['a.cc'], 7 | 'dependencies': [ 8 | '../../foo/b/b.gyp:b', 9 | 'c/c.gyp:c', 10 | ], 11 | }, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/assembly/src/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern int lib1_function(void); 4 | 5 | int main(void) 6 | { 7 | fprintf(stdout, "Hello from program.c\n"); 8 | fflush(stdout); 9 | fprintf(stdout, "Got %d.\n", lib1_function()); 10 | fflush(stdout); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/generator-output/copies/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/src/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/hard_dependency/src/c.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #ifndef C_H_ 6 | #define C_H_ 7 | 8 | int funcC(); 9 | 10 | #endif // C_H_ 11 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/c.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include "c.h" 7 | 8 | int funcC() { 9 | return VALUE; 10 | } 11 | -------------------------------------------------------------------------------- /test/generator-output/actions/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/copies/copies-out/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/rules/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir2/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir3/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/hard_dependency/src/c.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include "b.h" 6 | #include "c.h" 7 | 8 | int funcC() { 9 | return funcB(); 10 | } 11 | -------------------------------------------------------------------------------- /test/mac/framework-headers/myframework.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface TestObject : NSObject 8 | @end 9 | -------------------------------------------------------------------------------- /test/rules-variables/src/input_ext.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | void input_ext() { 8 | printf("input_ext\n"); 9 | } 10 | -------------------------------------------------------------------------------- /test/win/compiler-flags/force-include-files.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | std::list > l; 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /test/win/idl-rules/Window.idl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | [ 6 | WillBeGarbageCollected, 7 | ] interface Window { 8 | void alert(); 9 | }; 10 | -------------------------------------------------------------------------------- /test/win/ml-safeseh/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | extern "C" { 6 | int zero(void); 7 | } 8 | 9 | int main() { 10 | return zero(); 11 | } 12 | -------------------------------------------------------------------------------- /test/win/uldi/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | extern int some_function(); 6 | 7 | int main() { 8 | some_function(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/actions-multiple/src/foo.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | void foo(void) { 10 | printf("foo\n"); 11 | } 12 | -------------------------------------------------------------------------------- /test/generator-output/copies/subdir/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir1/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir2/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/mac/ldflags/subdirectory/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleSignature 6 | ???? 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/mac/postbuild-copy-bundle/postbuild-copy-framework.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | set -e 8 | 9 | rsync -acC --delete "$1" "$2" 10 | -------------------------------------------------------------------------------- /test/mac/postbuild-multiple-configurations/postbuild-touch-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | touch "${BUILT_PRODUCTS_DIR}/postbuild-file" 8 | -------------------------------------------------------------------------------- /test/win/compiler-flags/rtti-on.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _CPPRTTI 6 | #error 7 | #endif 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/warning-level1.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | int export; // Cause a level 1 warning (C4237). 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /test/win/importlib/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | __declspec(dllimport) void some_function(); 6 | 7 | int main() { 8 | some_function(); 9 | } 10 | -------------------------------------------------------------------------------- /test/conditions/elseif/program.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main() { 8 | printf("%s\n", FOO); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir1/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir2/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/copies/subdir/copies-out/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir2/rules-out/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir2/deeper/build/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/hello/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | printf("Hello, world!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/hello/hello2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | printf("Hello, two!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/mac/action-envvars/action/action.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | set -e 6 | 7 | echo 'Test output' > "${BUILT_PRODUCTS_DIR}/result" 8 | echo 'Other output' > "$1" 9 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/valid_c.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file exists to test that valid C files compile correctly. 6 | 7 | void FunctionInCFile(void) { 8 | } 9 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/warn_about_missing_newline.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Important: Don't terminate this file with a newline. 6 | int main() { 7 | return 0; 8 | } -------------------------------------------------------------------------------- /test/msvs/uldi2010/hello2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int hello2() { 8 | printf("Hello, two!\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/rules-variables/src/input_name/test.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | void input_name() { 8 | printf("input_name\n"); 9 | } 10 | -------------------------------------------------------------------------------- /test/rules-variables/src/test.input_root.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | void input_root() { 8 | printf("input_root\n"); 9 | } 10 | -------------------------------------------------------------------------------- /test/win/compiler-flags/character-set-mbcs.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _MBCS 6 | #error 7 | #endif 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/idl-excluded/bad.idl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | This is a dummy .idl file that will trigger an error if it is not excluded from 6 | the build. 7 | -------------------------------------------------------------------------------- /test/win/linker-flags/opt-ref.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int unused_function() { 6 | return 0; 7 | } 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/linker-flags/safeseh_hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | extern "C" { 6 | int zero(void); 7 | } 8 | 9 | int main() { 10 | return zero(); 11 | } 12 | -------------------------------------------------------------------------------- /test/android/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include 7 | 8 | int main() 9 | { 10 | printf("Hello, world!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir1/actions-out/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir2/actions-out/README.txt: -------------------------------------------------------------------------------- 1 | A place-holder for this Xcode build output directory, so that the 2 | test script can verify that .xcodeproj files are not created in 3 | their normal location by making the src/ read-only, and then 4 | selectively making this build directory writable. 5 | -------------------------------------------------------------------------------- /test/library_dirs/subdir/mylib.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "mylib.h" 6 | 7 | std::string my_foo(int x) { 8 | return std::string("world"); 9 | } 10 | -------------------------------------------------------------------------------- /test/mac/archs/my_main_file.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | #include 5 | extern int x; 6 | int main() { 7 | printf("hello, world %d\n", x); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/valid_cc.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file exists to test that valid C++ files compile correctly. 6 | 7 | void FunctionInCCFile() { 8 | } 9 | -------------------------------------------------------------------------------- /test/msvs/props/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | printf("Hello, world!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/rules-variables/src/input_path/subdir/test.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | void input_path() { 8 | printf("input_path\n"); 9 | } 10 | -------------------------------------------------------------------------------- /test/sanitize-rule-names/script.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import shutil 8 | import sys 9 | 10 | shutil.copyfile(*sys.argv[1:]) 11 | -------------------------------------------------------------------------------- /test/win/batch-file-action/somecmd.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: The redirs to nul are important. %2 can end up being an unterminated "'d 3 | :: string, so the remainder of the command line becomes the target file name, 4 | :: which in turn fails because it's a filename containing >, nul, etc. 5 | copy /y %1 %2 >nul 2>nul 6 | -------------------------------------------------------------------------------- /test/win/importlib/has-exports.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | __declspec(dllexport) void some_function() { 6 | } 7 | 8 | int main() { 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/linker-flags/additional-deps.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main() { 8 | WSAStartup(0, 0); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/linker-flags/delay-load.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main() { 8 | SHCreateDirectory(0, 0); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/linker-flags/library-adjust.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main() { 8 | WSAStartup(0, 0); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/vs-macros/do_stuff.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import sys 6 | 7 | input = open(sys.argv[1], "r").read() 8 | open(sys.argv[2], "w").write(input + "Modified.") 9 | -------------------------------------------------------------------------------- /tools/Xcode/README: -------------------------------------------------------------------------------- 1 | Specifications contains syntax formatters for Xcode 3. These do not appear to be supported yet on Xcode 4. To use these with Xcode 3 please install both the gyp.pbfilespec and gyp.xclangspec files in 2 | 3 | ~/Library/Application Support/Developer/Shared/Xcode/Specifications/ 4 | 5 | and restart Xcode. -------------------------------------------------------------------------------- /test/actions-multiple/src/copy.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2011 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | import shutil 7 | import sys 8 | 9 | shutil.copyfile(sys.argv[1], sys.argv[2]) 10 | -------------------------------------------------------------------------------- /test/compiler-override/my_nm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2014 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | with open('RAN_MY_NM', 'w') as f: 8 | f.write('RAN_MY_NM') 9 | -------------------------------------------------------------------------------- /test/configurations/x64/configurations.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) { 4 | if (sizeof(void*) == 4) { 5 | printf("Running Win32\n"); 6 | } else if (sizeof(void*) == 8) { 7 | printf("Running x64\n"); 8 | } else { 9 | printf("Unexpected platform\n"); 10 | } 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/hard_dependency/src/b.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #ifndef B_H_ 6 | #define B_H_ 7 | 8 | #include "a.h" 9 | 10 | int funcB(); 11 | 12 | #endif // B_H_ 13 | -------------------------------------------------------------------------------- /test/mac/framework/TestFramework/ObjCVectorInternal.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | struct ObjCVectorImp { 8 | std::vector v; 9 | }; 10 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/valid_m.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file exists to test that valid Objective-C files compile correctly. 6 | 7 | void FunctionInMFile(void) { 8 | } 9 | -------------------------------------------------------------------------------- /test/msvs/external_builder/hello.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main(void) { 8 | printf("Hello, world!\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/msvs/list_excluded/hello.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main(void) { 8 | printf("Hello, world!\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/msvs/list_excluded/hello_mac.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int hello2() { 8 | printf("Hello, two!\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/msvs/props/AppName.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /test/rules-variables/src/subdir/input_dirname.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | void input_dirname() { 8 | printf("input_dirname\n"); 9 | } 10 | -------------------------------------------------------------------------------- /test/win/compiler-flags/warning-as-error.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | // Cause a warning, even at /W1 7 | int export; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/win/linker-flags/main-crt.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Stub so we can link with /NODEFAULTLIB when checking disasm. 6 | int mainCRTStartup() { 7 | return 5; 8 | } 9 | -------------------------------------------------------------------------------- /test/gyp-defines/echo.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[2], 'w+') 10 | f.write(sys.argv[1]) 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/hard_dependency/src/a.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #ifndef A_H_ 6 | #define A_H_ 7 | 8 | #include "generated.h" 9 | 10 | int funcA(); 11 | 12 | #endif // A_H_ 13 | -------------------------------------------------------------------------------- /test/mac/clang-cxx-language-standard/c++11.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | static_assert(__cplusplus == 201103L, "wrong c++ standard version"); 6 | 7 | int main() { return 0; } 8 | 9 | -------------------------------------------------------------------------------- /test/mac/loadable-module/module.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int SuperFly() { 6 | return 42; 7 | } 8 | 9 | const char* SuperFoo() { 10 | return "Hello World"; 11 | } 12 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/valid_mm.mm: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This file exists to test that valid Objective-C++ files compile correctly. 6 | 7 | void FunctionInMMFile() { 8 | } 9 | -------------------------------------------------------------------------------- /test/msvs/config_attrs/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | printf("Hello, world!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/msvs/external_builder/msbuild_action.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import sys 6 | 7 | with open('msbuild_action.out', 'w') as f: 8 | f.write(' '.join(sys.argv)) 9 | 10 | -------------------------------------------------------------------------------- /test/win/compiler-flags/disable-specific-warnings.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | // Causes level 1 warning (C4700) 7 | int i; 8 | return i; 9 | } 10 | -------------------------------------------------------------------------------- /test/win/compiler-flags/function-level-linking.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int comdat_function() { 6 | return 1; 7 | } 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/runtime-checks.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef __MSVC_RUNTIME_CHECKS 6 | #error 7 | #endif 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/build-option/hello.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | int main(void) 10 | { 11 | printf("Hello, world!\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/configurations/basics/configurations.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | #ifdef FOO 6 | printf("Foo configuration\n"); 7 | #endif 8 | #ifdef DEBUG 9 | printf("Debug configuration\n"); 10 | #endif 11 | #ifdef RELEASE 12 | printf("Release configuration\n"); 13 | #endif 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/mac/libraries/subdir/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main() { 8 | std::cout << "Hello, world!" << std::endl; 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/make/main.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | #include "main.h" 8 | 9 | int main(void) { 10 | printf("hello world\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/msvs/external_builder/external_builder.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import sys 6 | 7 | with open('external_builder.out', 'w') as f: 8 | f.write(' '.join(sys.argv)) 9 | 10 | -------------------------------------------------------------------------------- /test/toolsets/toolsets.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | const char *GetToolset() { 6 | #ifdef TARGET 7 | return "Target"; 8 | #else 9 | return "Host"; 10 | #endif 11 | } 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/force-include-files-with-precompiled.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main() { 8 | std::string s; 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/vs-macros/test_exists.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import os 6 | import sys 7 | 8 | if not os.path.exists(sys.argv[1]): 9 | raise 10 | open(sys.argv[2], 'w').close() 11 | -------------------------------------------------------------------------------- /test/assembly/src/override_asm.asm: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2012 Google Inc. All rights reserved. 2 | ; Use of this source code is governed by a BSD-style license that can be 3 | ; found in the LICENSE file. 4 | 5 | ; This is a placeholder. It should not be referenced if overrides work 6 | ; correctly. 7 | 8 | Bad stuff that shouldn't assemble. 9 | -------------------------------------------------------------------------------- /test/compiler-override/my_readelf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2014 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | with open('RAN_MY_READELF', 'w') as f: 8 | f.write('RAN_MY_READELF') 9 | -------------------------------------------------------------------------------- /test/ios/watch/WatchContainer/ViewController.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface ViewController : UIViewController 8 | 9 | 10 | @end 11 | 12 | -------------------------------------------------------------------------------- /test/make_global_settings/full-toolchain/my_nm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2014 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | with open('RAN_MY_NM', 'w') as f: 8 | f.write('RAN_MY_NM') 9 | -------------------------------------------------------------------------------- /test/msvs/shared_output/hello.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | int main(void) { 10 | printf("Hello, world!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/b.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef B_H_ 7 | #define B_H_ 8 | 9 | #include "a.h" 10 | 11 | int funcB(); 12 | 13 | #endif // B_H_ 14 | -------------------------------------------------------------------------------- /test/standalone/standalone.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name' : 'foo', 9 | 'type' : 'executable' 10 | }, 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/variables/latelate/src/program.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | 10 | int main(void) { 11 | printf(FOO "\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/win/linker-flags/subsystem-windows.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /test/win/precompiled/precomp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | // The precompiled header does not have to be the first one in the file. 6 | 7 | #include 8 | #include 9 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # Names should be added to this file like so: 2 | # Name or Organization 3 | 4 | Google Inc. 5 | Bloomberg Finance L.P. 6 | Yandex LLC 7 | 8 | Steven Knight 9 | Ryan Norton 10 | David J. Sankel 11 | Eric N. Vander Weele 12 | -------------------------------------------------------------------------------- /test/actions-bare/src/bare.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'wb') 10 | f.write('Hello from bare.py\n') 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/defines-escaping/defines-escaping.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | printf(TEST_FORMAT, TEST_ARGS); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/empty-target/empty-target.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'empty_target', 9 | 'type': 'none', 10 | }, 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /test/ios/extension/ActionExtension/ActionViewController.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface ActionViewController : UIViewController 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /test/ios/extension/ExtensionContainer/ViewController.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface ViewController : UIViewController 8 | 9 | 10 | @end 11 | 12 | -------------------------------------------------------------------------------- /test/msvs/shared_output/there/there.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | int main(void) { 10 | printf("Hello, world!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/rules/src/subdir2/program.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #include 7 | 8 | int main(void) 9 | { 10 | printf("Hello from program.c\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/same-gyp-name/library/one/sub.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | { 5 | 'targets': [ 6 | { 7 | 'target_name': 'one', 8 | 'type': 'static_library', 9 | }, 10 | ], 11 | } 12 | -------------------------------------------------------------------------------- /test/same-gyp-name/library/two/sub.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | { 5 | 'targets': [ 6 | { 7 | 'target_name': 'two', 8 | 'type': 'static_library', 9 | }, 10 | ], 11 | } 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/treat-wchar-t-as-built-in-type1.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifdef _NATIVE_WCHAR_T_DEFINED 6 | #error 7 | #endif 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/treat-wchar-t-as-built-in-type2.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _NATIVE_WCHAR_T_DEFINED 6 | #error 7 | #endif 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/large-pdb/dllmain.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) { 8 | return TRUE; 9 | } 10 | -------------------------------------------------------------------------------- /test/win/linker-flags/library-directories-reference.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | extern int library_function(); 6 | 7 | int main() { 8 | library_function(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/hard_dependency/src/emit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2011 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'wb') 10 | f.write('/* Hello World */\n') 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/mac/global-settings/src/dir1/dir1.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | { 5 | 'targets': [ 6 | { 7 | 'target_name': 'dir1_target', 8 | 'type': 'none', 9 | }, 10 | ], 11 | } 12 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/a.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef A_H_ 7 | #define A_H_ 8 | 9 | #include "a/generated.h" 10 | 11 | int funcA(); 12 | 13 | #endif // A_H_ 14 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/c.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | #ifndef C_H_ 7 | #define C_H_ 8 | 9 | #include "c/generated.h" 10 | 11 | int funcC(); 12 | 13 | #endif // C_H_ 14 | -------------------------------------------------------------------------------- /test/toolsets/toolsets_shared.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | const char *GetToolsetShared() { 6 | #ifdef TARGET 7 | return "Target"; 8 | #else 9 | return "Host"; 10 | #endif 11 | } 12 | -------------------------------------------------------------------------------- /test/variables/commands/repeated_multidir/print_cwd_basename.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright 2014 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import os 8 | import os.path 9 | 10 | print os.path.basename(os.getcwd()) 11 | -------------------------------------------------------------------------------- /test/win/generator-output-different-drive/prog.c: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | 7 | int main(void) { 8 | printf("Hello from prog.c\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/linker-flags/deffile.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | void AnExportedFunction() { 6 | } 7 | 8 | void AnotherExportedFunction() { 9 | } 10 | 11 | int main() { 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/win/linker-flags/link-warning.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This will cause LNK4254. 6 | #pragma comment(linker, "/merge:.data=.text") 7 | 8 | int main() { 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/additional-targets/src/dir1/emit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'wb') 10 | f.write('Hello from emit.py\n') 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/compiler-override/test.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Deliberate C syntax error as this file should never be passed to 6 | // the actual compiler 7 | #error Should not be passed to a real compiler 8 | -------------------------------------------------------------------------------- /test/dependencies/double_dependent.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'double_dependent', 9 | 'type': 'none', 10 | }, 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /test/dependencies/main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | extern int funcA(); 10 | 11 | int main() { 12 | printf("%d\n", funcA()); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/mac/archs/file_c.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "file_a.h" 6 | #include "file_b.h" 7 | 8 | void PublicFunctionC() { 9 | DependentFunctionA(); 10 | DependentFunctionB(); 11 | } 12 | -------------------------------------------------------------------------------- /test/mac/archs/file_d.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "file_a.h" 6 | #include "file_b.h" 7 | 8 | void PublicFunctionD() { 9 | DependentFunctionA(); 10 | DependentFunctionB(); 11 | } 12 | -------------------------------------------------------------------------------- /test/make_global_settings/full-toolchain/my_readelf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2014 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | import sys 6 | print sys.argv 7 | with open('RAN_MY_READELF', 'w') as f: 8 | f.write('RAN_MY_READELF') 9 | -------------------------------------------------------------------------------- /test/analyzer/test2.includes.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'sources': [ 7 | 'a.cc', 8 | 'b.cc' 9 | ], 10 | 'includes': [ 11 | 'test2.includes.includes.gypi', 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/compiler-override/cxxtest.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Deliberate C syntax error as this file should never be passed to 6 | // the actual compiler 7 | #error Should not be passed to a real compiler 8 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/emit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2011 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'wb') 10 | f.write('/* Hello World */\n') 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/same-rule-output-file-name/src/touch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'w+') 10 | f.write('Hello from touch.py\n') 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/warning-level4.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | const int i = -1; 7 | // Cause a level 4 warning (C4245). 8 | unsigned int j = i; 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /tools/emacs/run-unit-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | emacs --no-site-file --no-init-file --batch \ 6 | --load ert.el --load gyp.el --load gyp-tests.el \ 7 | -f ert-run-tests-batch-and-exit 8 | -------------------------------------------------------------------------------- /test/actions-subdir/src/make-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | contents = 'Hello from make-file.py\n' 10 | 11 | open(sys.argv[1], 'wb').write(contents) 12 | -------------------------------------------------------------------------------- /test/actions/src/subdir2/make-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | contents = "Hello from make-file.py\n" 10 | 11 | open(sys.argv[1], 'wb').write(contents) 12 | -------------------------------------------------------------------------------- /test/errors/duplicate_targets.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'foo' 9 | }, 10 | { 11 | 'target_name': 'foo' 12 | }, 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /test/library_dirs/subdir/hello.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | #include "mylib.h" 7 | 8 | int main() { 9 | std::cout << "Hello " << my_foo(99) << std::endl; 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/link-dependency/mymalloc.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // The windows ninja generator is expecting an import library to get generated, 4 | // but it doesn't if there are no exports. 5 | #ifdef _MSC_VER 6 | __declspec(dllexport) void foo() {} 7 | #endif 8 | 9 | void *malloc(size_t size) { 10 | (void)size; 11 | return (void*)0xdeadbeef; 12 | } 13 | -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/main.m: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | int main(int argc, char *argv[]) 8 | { 9 | return NSApplicationMain(argc, (const char **) argv); 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/src/copy-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | import sys 7 | 8 | contents = open(sys.argv[1], 'r').read() 9 | open(sys.argv[2], 'wb').write(contents) 10 | 11 | sys.exit(0) 12 | -------------------------------------------------------------------------------- /test/msvs/uldi2010/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | extern int hello2(); 8 | 9 | int main(void) { 10 | printf("Hello, world!\n"); 11 | hello2(); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/same-target-name-different-directory/src/touch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2012 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'w+') 10 | f.write('Hello from touch.py\n') 11 | f.close() 12 | -------------------------------------------------------------------------------- /test/android/32or64.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. 4 | */ 5 | 6 | const char* getString() 7 | { 8 | #ifdef __LP64__ 9 | return "Hello, 64-bit world!\n"; 10 | #else 11 | return "Hello, 32-bit world!\n"; 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir2/make-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | contents = "Hello from make-file.py\n" 10 | 11 | open(sys.argv[1], 'wb').write(contents) 12 | -------------------------------------------------------------------------------- /test/rules-dirname/src/copy-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2011 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | import sys 7 | 8 | contents = open(sys.argv[1], 'r').read() 9 | open(sys.argv[2], 'wb').write(contents) 10 | 11 | sys.exit(0) 12 | -------------------------------------------------------------------------------- /test/win/compiler-flags/additional-include-dirs.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // No path qualification to test compiler include dir specification. 6 | #include "header.h" 7 | 8 | int main() { 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/compiler-flags/character-set-unicode.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _UNICODE 6 | #error 7 | #endif 8 | 9 | #ifndef UNICODE 10 | #error 11 | #endif 12 | 13 | int main() { 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/win/idl-excluded/copy-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | import sys 7 | 8 | contents = open(sys.argv[1], 'r').read() 9 | open(sys.argv[2], 'wb').write(contents) 10 | 11 | sys.exit(0) 12 | -------------------------------------------------------------------------------- /test/library/src/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void lib1_function(void); 4 | extern void lib2_function(void); 5 | extern void moveable_function(void); 6 | 7 | int main(void) 8 | { 9 | fprintf(stdout, "Hello from program.c\n"); 10 | fflush(stdout); 11 | lib1_function(); 12 | lib2_function(); 13 | moveable_function(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/actions-subdir/src/subdir/make-subdir-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | contents = 'Hello from make-subdir-file.py\n' 10 | 11 | open(sys.argv[1], 'wb').write(contents) 12 | -------------------------------------------------------------------------------- /test/actions/generated-header/action.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2013 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import os 8 | import sys 9 | 10 | outfile = sys.argv[1] 11 | open(outfile, 'w').write('const char kFoo[] = "%s";' % sys.argv[2]) 12 | -------------------------------------------------------------------------------- /test/errors/file_cycle1.gyp: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'middle', 9 | 'type': 'none', 10 | 'dependencies': [ 'file_cycle0.gyp:bottom' ], 11 | }, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/generator-output/rules/copy-file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | contents = open(sys.argv[1], 'r').read() 10 | open(sys.argv[2], 'wb').write(contents) 11 | 12 | sys.exit(0) 13 | -------------------------------------------------------------------------------- /test/mac/clang-cxx-library/libc++.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | #ifndef _LIBCPP_VERSION 7 | #error expected std library: libc++ 8 | #endif 9 | 10 | int main() { std::string x; return x.size(); } 11 | 12 | -------------------------------------------------------------------------------- /test/mac/clang-cxx-library/libstdc++.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | #ifndef __GLIBCXX__ 7 | #error expected std library: libstdc++ 8 | #endif 9 | 10 | int main() { std::string x; return x.size(); } 11 | 12 | -------------------------------------------------------------------------------- /test/actions-none/src/fake_cross.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | 7 | import sys 8 | 9 | fh = open(sys.argv[-1], 'wb') 10 | for filename in sys.argv[1:-1]: 11 | fh.write(open(filename).read()) 12 | fh.close() 13 | -------------------------------------------------------------------------------- /test/cflags/cflags.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | #ifdef FOO 10 | printf("FOO defined\n"); 11 | #else 12 | printf("FOO not defined\n"); 13 | #endif 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/cxxflags/cxxflags.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int main(void) 8 | { 9 | #ifdef ABC 10 | printf("With define\n"); 11 | #else 12 | printf("No define\n"); 13 | #endif 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/ios/watch/WatchKitExtension/InterfaceController.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | #import 7 | 8 | @interface InterfaceController : WKInterfaceController 9 | @end 10 | 11 | -------------------------------------------------------------------------------- /test/msvs/external_builder/msbuild_rule.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | import sys, os.path 6 | 7 | sys.argv[1] = os.path.basename(sys.argv[1]) 8 | 9 | with open('msbuild_rule.out', 'w') as f: 10 | f.write(' '.join(sys.argv)) 11 | 12 | -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/printvars.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2011 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | """ 8 | Prints interesting vars 9 | """ 10 | 11 | import sys; 12 | 13 | out = open(sys.argv[2], 'w') 14 | out.write(sys.argv[1]); 15 | -------------------------------------------------------------------------------- /test/android/hello.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'hello.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/assembly/src/lib1.S: -------------------------------------------------------------------------------- 1 | #if PLATFORM_WINDOWS || PLATFORM_MAC 2 | # define IDENTIFIER(n) _##n 3 | #else /* Linux */ 4 | # define IDENTIFIER(n) n 5 | #endif 6 | 7 | .globl IDENTIFIER(lib1_function) 8 | IDENTIFIER(lib1_function): 9 | #if !defined(PLATFORM_ANDROID) 10 | movl $42, %eax 11 | ret 12 | #else /* Android (assuming ARM) */ 13 | mov r0, #42 14 | bx lr 15 | #endif 16 | -------------------------------------------------------------------------------- /test/errors/duplicate_node.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 'target_name' : 'foo', 'type': 'executable' }, 8 | ], 9 | 'targets': [ 10 | { 'target_name' : 'bar', 'type': 'executable' }, 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/hello/hello.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'hello.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/hello/hello2.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'hello2.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/same-source-file-name/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from prog1.c\n"); 8 | func(); 9 | /* 10 | * Uncomment to test same-named files in different directories, 11 | * which Visual Studio doesn't support. 12 | subdir1_func(); 13 | subdir2_func(); 14 | */ 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/same-source-file-name/src/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func(void); 4 | 5 | int main(void) 6 | { 7 | printf("Hello from prog2.c\n"); 8 | func(); 9 | /* 10 | * Uncomment to test same-named files in different directories, 11 | * which Visual Studio doesn't support. 12 | subdir1_func(); 13 | subdir2_func(); 14 | */ 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/self-dependency/self_dependency.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'includes': [ 7 | 'common.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'a', 12 | 'type': 'none', 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/additional-targets/src/all.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'all_targets', 9 | 'type': 'none', 10 | 'dependencies': ['dir1/actions.gyp:*'], 11 | }, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/build-option/hello.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'hello.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/custom-generator/test.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'exe', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'main.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/exclusion/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int func1(void) { 8 | return 42; 9 | } 10 | 11 | int main(void) { 12 | printf("Hello, world!\n"); 13 | printf("%d\n", func1()); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/make/dependencies.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'main', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'main.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/product/hello.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | int func1(void) { 8 | return 42; 9 | } 10 | 11 | int main(void) { 12 | printf("Hello, world!\n"); 13 | printf("%d\n", func1()); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/variables/filelist/update_golden: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (c) 2009 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | python ../../../gyp --debug variables --debug general --format gypd --depth . src/filelist.gyp > filelist.gyp.stdout 8 | cp -f src/filelist.gypd filelist.gypd.golden 9 | -------------------------------------------------------------------------------- /test/win/compiler-flags/warning-level2.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int f(int x) { 6 | return 0; 7 | } 8 | 9 | int main() { 10 | double x = 10.1; 11 | // Cause a level 2 warning (C4243). 12 | return f(x); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/cxxflags/cxxflags.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'cxxflags', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'cxxflags.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/ios/watch/WatchContainer/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface AppDelegate : UIResponder 8 | 9 | @property (strong, nonatomic) UIWindow *window; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /test/mac/missing-cfbundlesignature/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | ${EXECUTABLE_NAME} 7 | CFBundlePackageType 8 | APPL 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/ninja/action-rule-hash/subdir/emit.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Copyright (c) 2014 Google Inc. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE file. 6 | 7 | import sys 8 | 9 | f = open(sys.argv[1], 'wb') 10 | f.write('int main() {\n') 11 | f.write(' return 0;\n') 12 | f.write('}\n') 13 | f.close() 14 | -------------------------------------------------------------------------------- /test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'empty', 9 | 'type': 'shared_library', 10 | 'sources': [ 'empty.s' ], 11 | }, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/rename/filecase/test.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | { 5 | 'targets': [ 6 | { 7 | 'target_name': 'filecaserename', 8 | 'type': 'executable', 9 | 'sources': [ 10 | 'file.c', 11 | ], 12 | }, 13 | ], 14 | } 15 | -------------------------------------------------------------------------------- /test/rules-dirname/src/subdir/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | namespace gen { 5 | extern void nodir(); 6 | extern void c(); 7 | extern void baz(); 8 | } 9 | 10 | int main() { 11 | gen::nodir(); 12 | gen::c(); 13 | gen::baz(); 14 | } 15 | -------------------------------------------------------------------------------- /test/win/compiler-flags/additional-options.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | int main() { 6 | // Generate a warning that will appear at level 4, but not level 1 7 | // (truncation and unused local). 8 | char c = 123456; 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/win/compiler-flags/uninit.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Should trigger C6001: using uninitialized memory for |i|. 6 | int f(bool b) { 7 | int i; 8 | if (b) 9 | i = 0; 10 | return i; 11 | } 12 | 13 | int main() {} 14 | -------------------------------------------------------------------------------- /test/win/linker-flags/mapfile.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | __declspec(dllexport) 6 | void AnExportedFunction() { 7 | // We need an exported function to verify that /MAPINFO:EXPORTS works. 8 | } 9 | 10 | int main() { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/win/linker-flags/no-default-libs.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'test_default', 9 | 'type': 'executable', 10 | 'sources': ['no-default-libs.cc'], 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/win/precompiled/hello2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | // Unlike hello.c, this file specifies the headers. 6 | 7 | #include 8 | #include 9 | 10 | int hello2() { 11 | printf("Hello, two!\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/actions-multiple/src/filter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2011 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | 7 | import sys 8 | 9 | data = open(sys.argv[3], 'r').read() 10 | fh = open(sys.argv[4], 'w') 11 | fh.write(data.replace(sys.argv[1], sys.argv[2])) 12 | fh.close() 13 | -------------------------------------------------------------------------------- /test/analyzer/test2.toplevel_includes.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'exe3', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'e.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/errors/missing_dep.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'foo', 9 | 'type': 'static_library', 10 | 'dependencies': [ 11 | 'missing.gyp' 12 | ] 13 | }, 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /test/mac/libtool-zero/test.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'mylib', 9 | 'type': 'static_library', 10 | 'sources': [ 11 | 'mylib.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/sibling/src/prog1/prog1.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program1', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'prog1.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/sibling/src/prog2/prog2.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program2', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'prog2.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/toplevel-dir/src/sub2/prog2.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'prog2', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'prog2.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/win/compiler-flags/buffer-security.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include 6 | #include 7 | 8 | int main() { 9 | char* stuff = reinterpret_cast(_alloca(256)); 10 | strcpy(stuff, "blah"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/win/compiler-flags/runtime-library-md.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _MT 6 | #error 7 | #endif 8 | 9 | #ifdef _DEBUG 10 | #error 11 | #endif 12 | 13 | #ifndef _DLL 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/compiler-flags/runtime-library-mt.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _MT 6 | #error 7 | #endif 8 | 9 | #ifdef _DEBUG 10 | #error 11 | #endif 12 | 13 | #ifdef _DLL 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/compiler-flags/runtime-library-mtd.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _MT 6 | #error 7 | #endif 8 | 9 | #ifndef _DEBUG 10 | #error 11 | #endif 12 | 13 | #ifdef _DLL 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/compiler-flags/warning-level3.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // Cause a level 3 warning (C4359). 6 | struct __declspec(align(8)) C8 { __int64 i; }; 7 | struct __declspec(align(4)) C4 { C8 m8; }; 8 | 9 | int main() { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/win/idl-includedirs/subdir/bar.idl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import "oaidl.idl"; 6 | 7 | [ 8 | object, 9 | uuid(A03D1421-B1EC-11D0-8C3A-00C04FC31D3F), 10 | ] 11 | interface Bar : IUnknown { 12 | HRESULT BarFunction(); 13 | }; 14 | -------------------------------------------------------------------------------- /test/include_dirs/src/subdir/subdir_includes.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "inc.h" 4 | #include "include1.h" 5 | #include "include2.h" 6 | 7 | int main(void) 8 | { 9 | printf("Hello from subdir/subdir_includes.c\n"); 10 | printf("Hello from %s\n", INC_STRING); 11 | printf("Hello from %s\n", INCLUDE1_STRING); 12 | printf("Hello from %s\n", INCLUDE2_STRING); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/ios/extension/ExtensionContainer/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface AppDelegate : UIResponder 8 | 9 | @property (strong, nonatomic) UIWindow *window; 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /test/mac/archs/file_a.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_ 6 | #define _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_ 7 | 8 | void DependentFunctionA(); 9 | 10 | #endif // _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_A_H_ 11 | -------------------------------------------------------------------------------- /test/mac/archs/file_b.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_ 6 | #define _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_ 7 | 8 | void DependentFunctionB(); 9 | 10 | #endif // _INCLUDED_TEST_MAC_DEPENDENCIES_FILE_B_H_ 11 | -------------------------------------------------------------------------------- /test/win/compiler-flags/runtime-library-mdd.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _MT 6 | #error 7 | #endif 8 | 9 | #ifndef _DEBUG 10 | #error 11 | #endif 12 | 13 | #ifndef _DLL 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/same-target-name/src/executable1.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'main1.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/same-target-name/src/executable2.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'main2.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/win/linker-flags/unsupported-manifest.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'test_unsupported', 9 | 'type': 'executable', 10 | 'sources': ['manifest-in-comment.cc'], 11 | }, 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /codereview.settings: -------------------------------------------------------------------------------- 1 | # This file is used by gcl to get repository specific information. 2 | CODE_REVIEW_SERVER: codereview.chromium.org 3 | CC_LIST: gyp-developer@googlegroups.com 4 | VIEW_VC: http://code.google.com/p/gyp/source/detail?r= 5 | TRY_ON_UPLOAD: True 6 | TRYSERVER_PROJECT: gyp 7 | TRYSERVER_PATCHLEVEL: 0 8 | TRYSERVER_ROOT: trunk 9 | TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl 10 | 11 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/tochar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # Copyright (c) 2012 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | import sys 7 | 8 | src = open(sys.argv[1]) 9 | dst = open(sys.argv[2], 'w') 10 | for ch in src.read(): 11 | dst.write('%d,\n' % ord(ch)) 12 | src.close() 13 | dst.close() 14 | -------------------------------------------------------------------------------- /test/library_dirs/subdir/mylib.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef TEST_LIBRARY_DIRS_SUBDIR_MYLIB_H 6 | #define TEST_LIBRARY_DIRS_SUBDIR_MYLIB_H 7 | 8 | #include 9 | 10 | std::string my_foo(int); 11 | 12 | #endif // TEST_LIBRARY_DIRS_SUBDIR_MYLIB_H 13 | -------------------------------------------------------------------------------- /test/msvs/missing_sources/hello_missing.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'hello_missing.cpp', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/same-gyp-name/src/subdir1/executable.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program1', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'main1.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/same-gyp-name/src/subdir2/executable.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program2', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'main2.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/toolsets/main.cc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Google Inc. All rights reserved. 2 | * Use of this source code is governed by a BSD-style license that can be 3 | * found in the LICENSE file. */ 4 | 5 | #include 6 | 7 | const char *GetToolset(); 8 | const char *GetToolsetShared(); 9 | 10 | int main(void) { 11 | printf("%s\n", GetToolset()); 12 | printf("Shared: %s\n", GetToolsetShared()); 13 | } 14 | -------------------------------------------------------------------------------- /test/variables/commands/repeated_multidir/dir_1/test_1.gyp: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'variables': { 7 | 'expected_value': 'dir_1', 8 | 'target_name': 'target_1', 9 | }, 10 | 'includes': [ 11 | '../repeated_command_common.gypi', 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/variables/commands/repeated_multidir/dir_2/test_2.gyp: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'variables': { 7 | 'expected_value': 'dir_2', 8 | 'target_name': 'target_2', 9 | }, 10 | 'includes': [ 11 | '../repeated_command_common.gypi', 12 | ], 13 | } 14 | -------------------------------------------------------------------------------- /test/analyzer/subdir/subdir2/subdir2.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'subdir2', 9 | 'type': 'static_library', 10 | 'sources': [ 11 | '../subdir_source.h', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/win/generator-output-different-drive/prog.gyp: -------------------------------------------------------------------------------- 1 | # Copyright 2013 The Chromium Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'program', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'prog.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/win/linker-flags/subdir/library.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'test_lib', 9 | 'type': 'static_library', 10 | 'sources': ['../library-directories-define.cc'], 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /test/external-cross-compile/src/program.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Google Inc. All rights reserved. 3 | * Use of this source code is governed by a BSD-style license that can be 4 | * found in the LICENSE file. 5 | */ 6 | 7 | #include 8 | 9 | static char data[] = { 10 | #include "cross_program.h" 11 | }; 12 | 13 | int main(void) { 14 | fwrite(data, 1, sizeof(data), stdout); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/make/noload/lib/shared.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'shared', 9 | 'type': 'shared_library', 10 | 'sources': [ 11 | 'shared.c', 12 | 'shared.h', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/compiler-override/compiler-exe.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'test.c', 12 | 'cxxtest.cc', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/dependencies/lib_only.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'a', 9 | 'type': 'static_library', 10 | 'sources': [ 11 | 'a.c', 12 | ], 13 | 'dependencies': ['b/b.gyp:b'], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/TestAppAppDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface TestAppAppDelegate : NSObject { 8 | NSWindow *window; 9 | } 10 | 11 | @property (assign) IBOutlet NSWindow *window; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /test/rules/src/rule.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) 2011 Google Inc. All rights reserved. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the LICENSE file. 5 | 6 | import sys 7 | 8 | f = open(sys.argv[1] + ".cc", "w") 9 | f.write("""\ 10 | #include 11 | 12 | int main() { 13 | puts("Hello %s"); 14 | return 0; 15 | } 16 | """ % sys.argv[1]) 17 | f.close() 18 | -------------------------------------------------------------------------------- /test/self-dependency/common.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | # A common file that other .gyp files include. 6 | # Makes every target in the project depend on dep.gyp:dep. 7 | { 8 | 'target_defaults': { 9 | 'dependencies': [ 10 | 'dep.gyp:dep', 11 | ], 12 | }, 13 | } 14 | -------------------------------------------------------------------------------- /test/win/compiler-flags/floating-point-model-fast.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifdef _M_FP_PRECISE 6 | #error 7 | #endif 8 | 9 | #ifdef _M_FP_STRICT 10 | #error 11 | #endif 12 | 13 | #ifndef _M_FP_FAST 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/compiler-flags/floating-point-model-precise.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef _M_FP_PRECISE 6 | #error 7 | #endif 8 | 9 | #ifdef _M_FP_STRICT 10 | #error 11 | #endif 12 | 13 | #ifdef _M_FP_FAST 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/compiler-flags/floating-point-model-strict.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifdef _M_FP_PRECISE 6 | #error 7 | #endif 8 | 9 | #ifndef _M_FP_STRICT 10 | #error 11 | #endif 12 | 13 | #ifdef _M_FP_FAST 14 | #error 15 | #endif 16 | 17 | int main() { 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/idl-includedirs/subdir/foo.idl: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import "oaidl.idl"; 6 | import "bar.idl"; 7 | 8 | [ 9 | object, 10 | uuid(9C1100DD-51D4-4827-AE9F-3B8FAC4AED72), 11 | ] 12 | interface Foo : IUnknown { 13 | HRESULT FooFunction(Bar* bar); 14 | }; 15 | -------------------------------------------------------------------------------- /test/rules-dirname/src/actions.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'pull_in_all_actions', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'subdir/input-rule-dirname.gyp:*', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/win/linker-flags/inline_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "inline_test.h" 6 | 7 | #include 8 | #pragma intrinsic(_ReturnAddress) 9 | 10 | bool IsFunctionInlined(void* caller_return_address) { 11 | return _ReturnAddress() == caller_return_address; 12 | } 13 | -------------------------------------------------------------------------------- /test/ios/watch/WatchKitExtension/Images.xcassets/MyImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x" 14 | } 15 | ], 16 | "info" : { 17 | "version" : 1, 18 | "author" : "xcode" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/msvs/shared_output/there/there.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'includes': ['../common.gypi'], 7 | 'targets': [ 8 | { 9 | 'target_name': 'there', 10 | 'type': 'executable', 11 | 'sources': [ 12 | 'there.c', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/rename/filecase/test-casesensitive.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | { 5 | 'targets': [ 6 | { 7 | 'target_name': 'filecaserename_sensitive', 8 | 'type': 'executable', 9 | 'sources': [ 10 | 'FiLe.c', 11 | 'fIlE.c', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/sibling/src/build/all.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'All', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | '../prog1/prog1.gyp:*', 12 | '../prog2/prog2.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/standalone-static-library/invalid.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'bad', 9 | 'type': 'executable', 10 | 'standalone_static_library': 1, 11 | 'sources': [ 12 | 'prog.c', 13 | ], 14 | }, 15 | ], 16 | } -------------------------------------------------------------------------------- /test/subdirectory/src/symroot.gypi: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'variables': { 7 | 'set_symroot%': 0, 8 | }, 9 | 'conditions': [ 10 | ['set_symroot == 1', { 11 | 'xcode_settings': { 12 | 'SYMROOT': '<(DEPTH)/build', 13 | }, 14 | }], 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/compiler-override/compiler-shared-lib.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style license that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'targets': [ 7 | { 8 | 'target_name': 'hello-lib', 9 | 'type': 'shared_library', 10 | 'sources': [ 11 | 'test.c', 12 | 'cxxtest.cc', 13 | ], 14 | }, 15 | ], 16 | } 17 | --------------------------------------------------------------------------------