├── OWNERS ├── test ├── make │ ├── main.h │ ├── noload │ │ ├── lib │ │ │ ├── shared.h │ │ │ ├── shared.c │ │ │ └── shared.gyp │ │ ├── main.c │ │ └── all.gyp │ ├── main.cc │ └── dependencies.gyp ├── many-actions │ ├── file0 │ ├── file1 │ ├── file2 │ ├── file3 │ └── file4 ├── win │ ├── asm-files │ │ ├── b.s │ │ ├── c.S │ │ ├── hello.cc │ │ └── asm-files.gyp │ ├── command-quote │ │ ├── a.S │ │ ├── go.bat │ │ └── bat with spaces.bat │ ├── vs-macros │ │ ├── input.S │ │ ├── stuff.blah │ │ ├── hello.cc │ │ ├── do_stuff.py │ │ └── test_exists.py │ ├── batch-file-action │ │ ├── infile │ │ └── somecmd.bat │ ├── compiler-flags │ │ ├── subdir │ │ │ └── header.h │ │ ├── hello.cc │ │ ├── pdbname.cc │ │ ├── force-include-files.cc │ │ ├── rtti-on.cc │ │ ├── warning-level1.cc │ │ ├── character-set-mbcs.cc │ │ ├── warning-as-error.cc │ │ ├── function-level-linking.cc │ │ ├── runtime-checks.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 │ │ └── default-char-is-unsigned.cc │ ├── rc-build │ │ ├── hello.h │ │ ├── subdir │ │ │ └── include.h │ │ ├── hello.ico │ │ └── small.ico │ ├── lib-flags │ │ ├── answer.h │ │ └── answer.cc │ ├── shard │ │ ├── hello1.cc │ │ ├── hello2.cc │ │ ├── hello3.cc │ │ ├── hello4.cc │ │ └── shard.gyp │ ├── uldi │ │ ├── a.cc │ │ ├── b.cc │ │ └── main.cc │ ├── linker-flags │ │ ├── hello.cc │ │ ├── library-directories-define.cc │ │ ├── deffile.def │ │ ├── opt-ref.cc │ │ ├── additional-deps.cc │ │ ├── delay-load.cc │ │ ├── library-adjust.cc │ │ ├── subsystem-windows.cc │ │ ├── library-directories-reference.cc │ │ ├── deffile.cc │ │ ├── no-default-libs.gyp │ │ ├── subdir │ │ │ └── library.gyp │ │ ├── library-adjust.gyp │ │ ├── deffile-multiple.gyp │ │ ├── entrypointsymbol.cc │ │ ├── extra.manifest │ │ ├── extra2.manifest │ │ └── nodefaultlib.cc │ ├── long-command-line │ │ ├── function.cc │ │ └── hello.cc │ ├── large-pdb │ │ ├── main.cc │ │ └── dllmain.cc │ ├── importlib │ │ ├── hello.cc │ │ └── has-exports.cc │ └── precompiled │ │ ├── precomp.c │ │ ├── hello2.c │ │ └── hello.c ├── mac │ ├── app-bundle │ │ ├── empty.c │ │ └── TestApp │ │ │ ├── English.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── InfoPlist-error.strings │ │ │ ├── main.m │ │ │ ├── TestAppAppDelegate.h │ │ │ └── TestAppAppDelegate.m │ ├── 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 │ ├── copy-dylib │ │ └── empty.c │ ├── installname │ │ ├── main.c │ │ └── file.c │ ├── ldflags-libtool │ │ ├── file.c │ │ └── test.gyp │ ├── objc-gc │ │ ├── c-file.c │ │ ├── cc-file.cc │ │ ├── needs-gc.m │ │ ├── needs-gc-mm.mm │ │ └── main.m │ ├── 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 │ ├── sourceless-module │ │ └── empty.c │ ├── depend-on-bundle │ │ ├── bundle.c │ │ ├── executable.c │ │ └── English.lproj │ │ │ └── InfoPlist.strings │ ├── missing-cfbundlesignature │ │ ├── file.c │ │ ├── Info.plist │ │ ├── Other-Info.plist │ │ └── Third-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 │ │ └── file.c │ ├── sdkroot │ │ ├── file.cc │ │ └── test_shorthand.sh │ ├── libraries │ │ └── subdir │ │ │ ├── README.txt │ │ │ ├── mylib.c │ │ │ └── hello.cc │ ├── 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 │ ├── archs │ │ ├── my_file.cc │ │ └── my_main_file.cc │ ├── 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 │ │ └── Info.plist │ ├── non-strs-flattened-to-env │ │ └── main.c │ ├── framework-headers │ │ ├── myframework.m │ │ └── myframework.h │ ├── action-envvars │ │ └── action │ │ │ └── action.sh │ ├── xcode-gcc │ │ ├── valid_c.c │ │ ├── warn_about_missing_newline.c │ │ ├── valid_cc.cc │ │ ├── valid_m.m │ │ ├── valid_mm.mm │ │ └── warn_about_invalid_offsetof_macro.cc │ ├── 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 │ │ ├── subdir1 │ │ ├── function1.in │ │ ├── function2.in │ │ └── program.c │ │ ├── subdir3 │ │ ├── function3.in │ │ └── program.c │ │ ├── an_asm.S │ │ ├── as.bat │ │ ├── subdir4 │ │ ├── asm-function.assem │ │ └── program.c │ │ ├── copy-file.py │ │ └── rule.py ├── sanitize-rule-names │ ├── blah.S │ ├── hello.cc │ └── script.py ├── actions-none │ └── src │ │ ├── foo.cc │ │ └── fake_cross.py ├── copies │ └── src │ │ ├── file1 │ │ ├── file2 │ │ ├── directory │ │ ├── file3 │ │ ├── file4 │ │ └── subdir │ │ │ └── file5 │ │ ├── parentdir │ │ └── subdir │ │ │ └── file6 │ │ └── copies-updir.gyp ├── linux │ └── implicit-rpath │ │ ├── file.c │ │ └── main.c ├── actions-multiple │ └── src │ │ ├── input.txt │ │ ├── foo.c │ │ ├── copy.py │ │ ├── filter.py │ │ └── main.c ├── 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 │ │ │ │ └── deeper.gyp │ │ │ └── build │ │ │ │ └── README.txt │ │ ├── subdir3 │ │ │ ├── inc3 │ │ │ │ └── include3.h │ │ │ └── build │ │ │ │ └── README.txt │ │ ├── build │ │ │ └── README.txt │ │ └── symroot.gypi │ ├── 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 │ │ │ └── program.c │ │ ├── build │ │ │ └── README.txt │ │ ├── copy-file.py │ │ └── rules.gyp │ └── actions │ │ ├── subdir1 │ │ ├── program.c │ │ ├── build │ │ │ └── README.txt │ │ ├── actions-out │ │ │ └── README.txt │ │ ├── make-prog1.py │ │ └── make-prog2.py │ │ ├── build │ │ └── README.txt │ │ ├── subdir2 │ │ ├── build │ │ │ └── README.txt │ │ ├── actions-out │ │ │ └── README.txt │ │ └── make-file.py │ │ └── actions.gyp ├── external-cross-compile │ └── src │ │ ├── bogus2.c │ │ ├── test1.cc │ │ ├── test2.c │ │ ├── test3.cc │ │ ├── test4.c │ │ ├── bogus1.cc │ │ ├── tochar.py │ │ ├── program.cc │ │ └── fake_cross.py ├── include_dirs │ └── src │ │ ├── inc.h │ │ ├── subdir │ │ ├── inc.h │ │ ├── inc2 │ │ │ └── include2.h │ │ ├── subdir_includes.c │ │ └── subdir_includes.gyp │ │ ├── inc1 │ │ └── include1.h │ │ ├── shadow1 │ │ └── shadow.h │ │ └── shadow2 │ │ └── shadow.h ├── rename │ └── filecase │ │ ├── file.c │ │ ├── test.gyp │ │ └── test-casesensitive.gyp ├── dependencies │ ├── b │ │ ├── b.c │ │ ├── b3.c │ │ └── b.gyp │ ├── c │ │ ├── d.c │ │ ├── c.c │ │ └── c.gyp │ ├── a.c │ ├── double_dependent.gyp │ ├── main.c │ └── lib_only.gyp ├── intermediate_dir │ └── src │ │ └── shared_infile.txt ├── variables │ ├── commands │ │ └── test.py │ ├── variable-in-path │ │ └── C1 │ │ │ └── hello.cc │ ├── latelate │ │ └── src │ │ │ └── program.cc │ └── filelist │ │ └── update_golden ├── assembly │ └── src │ │ ├── lib1.c │ │ ├── as.bat │ │ ├── program.c │ │ ├── override_asm.asm │ │ └── lib1.S ├── ninja │ ├── s-needs-no-depfiles │ │ ├── empty.s │ │ └── s-needs-no-depfiles.gyp │ ├── solibs_avoid_relinking │ │ ├── main.cc │ │ └── solib.cc │ ├── chained-dependency │ │ └── chained.c │ ├── normalize-paths-win │ │ └── hello.cc │ ├── use-custom-environment-files │ │ ├── use-custom-environment-files.cc │ │ └── use-custom-environment-files.gyp │ └── action_dependencies │ │ └── src │ │ ├── a.c │ │ ├── c.c │ │ ├── b.h │ │ ├── a.h │ │ ├── c.h │ │ ├── emit.py │ │ └── b.c ├── rules-dirname │ └── src │ │ ├── subdir │ │ ├── a │ │ │ └── b │ │ │ │ ├── c.printvars │ │ │ │ └── c.gencc │ │ ├── foo │ │ │ └── bar │ │ │ │ ├── baz.printvars │ │ │ │ └── baz.gencc │ │ ├── main.cc │ │ └── printvars.py │ │ ├── copy-file.py │ │ └── actions.gyp ├── configurations │ ├── target_platform │ │ ├── left.c │ │ ├── right.c │ │ └── front.c │ ├── x64 │ │ └── configurations.c │ ├── basics │ │ └── configurations.c │ ├── invalid │ │ ├── type.gyp │ │ ├── actions.gyp │ │ ├── sources.gyp │ │ ├── libraries.gyp │ │ ├── target_name.gyp │ │ ├── dependencies.gyp │ │ ├── link_settings.gyp │ │ ├── configurations.gyp │ │ ├── standalone_static_library.gyp │ │ ├── all_dependent_settings.gyp │ │ └── direct_dependent_settings.gyp │ └── inheritance │ │ └── 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 │ │ └── all.gyp ├── 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 │ │ │ │ │ └── prog5.gyp │ │ │ │ └── prog4.gyp │ │ │ └── prog3.gyp │ │ └── prog2.gyp │ │ └── builddir.gypi ├── compilable │ └── src │ │ ├── lib1.hpp │ │ ├── lib1.cpp │ │ └── program.cpp ├── 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 │ │ └── prog3.c ├── actions │ ├── generated-header │ │ ├── main.cc │ │ └── action.py │ └── src │ │ ├── subdir1 │ │ ├── program.c │ │ ├── make-prog1.py │ │ └── make-prog2.py │ │ ├── subdir2 │ │ └── make-file.py │ │ └── subdir3 │ │ └── generate_main.py ├── same-gyp-name │ ├── src │ │ ├── subdir1 │ │ │ ├── main1.cc │ │ │ └── executable.gyp │ │ ├── subdir2 │ │ │ ├── main2.cc │ │ │ └── executable.gyp │ │ └── all.gyp │ └── library │ │ ├── one │ │ └── sub.gyp │ │ ├── two │ │ └── sub.gyp │ │ └── test.gyp ├── multiple-targets │ └── src │ │ ├── common.c │ │ ├── prog1.c │ │ └── prog2.c ├── standalone-static-library │ ├── mylib.c │ ├── prog.c │ └── invalid.gyp ├── rules-rebuild │ └── src │ │ ├── prog1.in │ │ ├── prog2.in │ │ └── main.c ├── dependency-copy │ └── src │ │ ├── file1.c │ │ └── file2.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 │ │ │ └── prog3.gyp │ │ └── prog2.gyp │ │ ├── symroot.gypi │ │ └── prog1.gyp ├── toplevel-dir │ └── src │ │ ├── sub1 │ │ ├── prog1.c │ │ └── main.gyp │ │ └── sub2 │ │ ├── prog2.c │ │ └── prog2.gyp ├── ios │ └── app-bundle │ │ └── TestApp │ │ ├── English.lproj │ │ ├── InfoPlist.strings │ │ └── InfoPlist-error.strings │ │ └── main.m ├── relative │ └── foo │ │ ├── b │ │ ├── b.gyp │ │ └── b.cc │ │ └── a │ │ ├── a.cc │ │ ├── c │ │ ├── c.cc │ │ └── c.gyp │ │ └── a.gyp ├── module │ └── src │ │ ├── lib1.c │ │ └── lib2.c ├── library │ └── src │ │ ├── lib1.c │ │ ├── lib2.c │ │ ├── lib1_moveable.c │ │ ├── lib2_moveable.c │ │ └── program.c ├── errors │ ├── missing_targets.gyp │ ├── duplicate_targets.gyp │ ├── duplicate_basenames.gyp │ ├── duplicate_node.gyp │ └── missing_dep.gyp ├── compiler-override │ ├── my_cc.py │ ├── my_cxx.py │ ├── my_ld.py │ ├── test.c │ ├── cxxtest.cc │ ├── compiler.gyp │ └── compiler-host.gyp ├── msvs │ ├── external_builder │ │ ├── hello.z │ │ ├── msbuild_action.py │ │ ├── external_builder.py │ │ ├── hello.cpp │ │ └── msbuild_rule.py │ ├── uldi2010 │ │ ├── hello2.c │ │ └── hello.c │ ├── list_excluded │ │ ├── hello_mac.cpp │ │ ├── hello.cpp │ │ └── hello_exclude.gyp │ ├── props │ │ ├── AppName.vsprops │ │ └── hello.c │ ├── config_attrs │ │ └── hello.c │ ├── shared_output │ │ ├── hello.c │ │ ├── there │ │ │ ├── there.c │ │ │ └── there.gyp │ │ └── common.gypi │ ├── missing_sources │ │ └── hello_missing.gyp │ └── express │ │ ├── express.gyp │ │ └── base │ │ └── base.gyp ├── 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 │ │ └── test.c ├── gyp-defines │ └── echo.py ├── hello │ ├── hello.c │ ├── hello2.c │ ├── hello.gyp │ └── hello2.gyp ├── toolsets │ ├── toolsets.cc │ ├── toolsets_shared.cc │ └── main.cc ├── standalone │ └── standalone.gyp ├── actions-bare │ └── src │ │ └── bare.py ├── build-option │ ├── hello.c │ └── hello.gyp ├── defines-escaping │ └── defines-escaping.c ├── same-rule-output-file-name │ └── src │ │ ├── touch.py │ │ └── subdirs.gyp ├── actions-subdir │ └── src │ │ ├── make-file.py │ │ └── subdir │ │ └── make-subdir-file.py ├── same-target-name-different-directory │ └── src │ │ ├── touch.py │ │ └── subdirs.gyp ├── self-dependency │ ├── self_dependency.gyp │ └── common.gypi ├── custom-generator │ ├── test.gyp │ └── mygenerator.py ├── product │ └── hello.c ├── exclusion │ └── hello.c ├── same-target-name │ └── src │ │ ├── executable1.gyp │ │ ├── executable2.gyp │ │ └── all.gyp ├── cflags │ ├── cflags.gyp │ └── cflags.c ├── cxxflags │ ├── cxxflags.gyp │ └── cxxflags.cc ├── restat │ └── src │ │ ├── touch.py │ │ └── create_intermediate.py ├── no-output │ └── src │ │ └── nooutput.gyp ├── make_global_settings │ ├── basics │ │ └── make_global_settings.gyp │ └── env-wrapper │ │ └── wrapper.gyp └── defines │ └── defines-env.gyp ├── .gitignore ├── pylib └── gyp │ └── generator │ └── __init__.py ├── gyp.bat ├── gyp_dummy.c ├── samples └── samples.bat ├── AUTHORS ├── tools ├── Xcode │ └── README └── emacs │ ├── run-unit-tests.sh │ └── README ├── codereview.settings └── MANIFEST /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/actions-none/src/foo.cc: -------------------------------------------------------------------------------- 1 | foo.cc 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/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/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/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/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/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/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/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/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/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/rules-dirname/src/subdir/foo/bar/baz.printvars: -------------------------------------------------------------------------------- 1 | # Empty file for testing build rules 2 | -------------------------------------------------------------------------------- /test/assembly/src/as.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: Mock windows assembler. 3 | cl /c %1 /Fo"%2" 4 | 5 | -------------------------------------------------------------------------------- /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/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/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/mac/depend-on-bundle/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | -------------------------------------------------------------------------------- /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/win/rc-build/hello.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mumble-voip/libmumble-gyp/master/test/win/rc-build/hello.ico -------------------------------------------------------------------------------- /test/win/rc-build/small.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mumble-voip/libmumble-gyp/master/test/win/rc-build/small.ico -------------------------------------------------------------------------------- /test/link-objects/base.c: -------------------------------------------------------------------------------- 1 | void extra(); 2 | 3 | int main(int argc, char** argv) { 4 | extra(); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /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/ninja/chained-dependency/chained.c: -------------------------------------------------------------------------------- 1 | #include "generated/header.h" 2 | 3 | int main(int argc, char** argv) { 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /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/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/actions/generated-header/main.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "MyHeader.h" 4 | 5 | int main() { 6 | printf("%s\n", kFoo); 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/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/standalone-static-library/prog.c: -------------------------------------------------------------------------------- 1 | extern void print(void); 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | print(); 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/dependency-copy/src/file1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) 4 | { 5 | printf("Hello from file2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/home_dot_gyp/src/printfoo.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | printf("FOO is %s\n", FOO); 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/sibling/src/prog1/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) 4 | { 5 | printf("Hello from prog2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/subdirectory/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | printf("Hello from prog1.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /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/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/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/subdirectory/src/subdir/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | printf("Hello from prog2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/toplevel-dir/src/sub1/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) 4 | { 5 | printf("Hello from prog2.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /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/subdirectory/src/subdir/subdir2/prog3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) 4 | { 5 | printf("Hello from deeper.c\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /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-gc/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main() { 4 | printf("gc on: %d\n", [NSGarbageCollector defaultCollector] != NULL); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /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/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/configurations/target_platform/front.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const char *message(void); 4 | 5 | int main(int argc, char *argv[]) { 6 | printf("%s\n", message()); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /test/make/noload/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "lib/shared.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("Hello from %s.\n", kSharedStr); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /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/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func1(void); 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("Hello from prog1.c\n"); 8 | func1(); 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/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(); -------------------------------------------------------------------------------- /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 "%~dp0/gyp" %* 6 | -------------------------------------------------------------------------------- /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/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/multiple-targets/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void common(void); 4 | 5 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) 6 | { 7 | printf("hello from prog2.c\n"); 8 | common(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /gyp_dummy.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 | int main() { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/prog2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func2(void); 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("Hello from subdir2/prog2.c\n"); 8 | func2(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /test/rules/src/subdir3/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void function3(void); 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("Hello from program.c\n"); 8 | function3(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /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/rules-dirname/src/subdir/a/b/c.gencc: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | #include 3 | 4 | using std::cout; 5 | using std::endl; 6 | 7 | namespace gen { 8 | void c() { 9 | cout << "hi c" << endl; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /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/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/prog3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func3(void); 4 | 5 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) { 5 | fprintf(stdout, "Hello from program.c\n"); 6 | fflush(stdout); 7 | lib1_function(); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /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/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/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/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/rules-dirname/src/subdir/foo/bar/baz.gencc: -------------------------------------------------------------------------------- 1 | // -*- mode: c++ -*- 2 | #include 3 | 4 | using std::cout; 5 | using std::endl; 6 | 7 | namespace gen { 8 | void baz() { 9 | cout << "hello baz" << endl; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/builddir/src/subdir2/subdir3/subdir4/prog4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func4(void); 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("Hello from subdir2/subdir3/subdir4/prog4.c\n"); 8 | func4(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /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/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/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/rules-rebuild/src/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void prog1(void); 4 | extern void prog2(void); 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | printf("Hello from main.c\n"); 9 | prog1(); 10 | prog2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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(int argc, const char** argv) { 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /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/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/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func5(void); 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | printf("Hello from subdir2/subdir3/subdir4/subdir5/prog5.c\n"); 8 | func5(); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /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/actions/src/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void prog1(void); 4 | extern void prog2(void); 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | printf("Hello from program.c\n"); 9 | prog1(); 10 | prog2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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/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/rules/src/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void function1(void); 4 | extern void function2(void); 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | printf("Hello from program.c\n"); 9 | function1(); 10 | function2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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/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/generator-output/actions/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void prog1(void); 4 | extern void prog2(void); 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | printf("Hello from program.c\n"); 9 | prog1(); 10 | prog2(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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/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/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/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/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/strip/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 | static void the_static_function() {} 6 | 7 | void the_function() { 8 | the_static_function(); 9 | } 10 | -------------------------------------------------------------------------------- /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/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/assembly/src/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern int lib1_function(void); 4 | 5 | int main(int argc, char *argv[]) 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/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/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/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/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/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/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/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/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(int argc, char *argv[]) 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(int argc, char *argv[]) 8 | { 9 | printf("Hello, two!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /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/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/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/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(int argc, char *argv[]) 8 | { 9 | printf("Hello, world!\n"); 10 | return 0; 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(int argc, char *argv[]) { 8 | printf("Hello, world!\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /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(int argc, char *argv[]) 8 | { 9 | printf("Hello, world!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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/configurations/x64/configurations.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) { 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/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(int argc, char *argv[]) { 8 | printf("Hello, world!\n"); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /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/configurations/basics/configurations.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 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/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/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/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/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(int argc, char *argv[]) 10 | { 11 | printf("Hello, world!\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /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/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(int argc, char *argv[]) { 10 | printf("hello world\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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(int argc, char *argv[]) { 10 | printf("Hello, world!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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 c(); 6 | extern void baz(); 7 | } 8 | 9 | int main() { 10 | gen::c(); 11 | gen::baz(); 12 | } 13 | -------------------------------------------------------------------------------- /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/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(int argc, char *argv[]) 8 | { 9 | printf(TEST_FORMAT, TEST_ARGS); 10 | return 0; 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(int argc, char *argv[]) { 10 | printf("Hello, world!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /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/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(int argc, char *argv[]) { 11 | printf(FOO "\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /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/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/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() { return 0; } 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() { return 0; } 11 | 12 | -------------------------------------------------------------------------------- /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/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/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/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/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/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(int argc, char *argv[]) { 10 | printf("Hello, world!\n"); 11 | hello2(); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /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/errors/duplicate_basenames.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': 'static_library', 10 | 'sources': ['foo.c', 'foo.cc'], 11 | }, 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /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/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/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/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(int argc, char *argv[]) 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/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/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/mac/missing-cfbundlesignature/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | ${EXECUTABLE_NAME} 7 | CFBundlePackageType 8 | APPL 9 | 10 | 11 | -------------------------------------------------------------------------------- /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/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/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/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/same-source-file-name/src/prog1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern void func(void); 4 | 5 | int main(int argc, char *argv[]) 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(int argc, char *argv[]) 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/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/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(int argc, char *argv[]) { 12 | printf("Hello, world!\n"); 13 | printf("%d\n", func1()); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /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/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(int argc, char *argv[]) { 12 | printf("Hello, world!\n"); 13 | printf("%d\n", func1()); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/cflags/cflags.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': 'cflags', 9 | 'type': 'executable', 10 | 'opt': '-Os', 11 | 'sources': [ 12 | 'cflags.c', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /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/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 | 'opt': '-Os', 11 | 'sources': [ 12 | 'cxxflags.cc', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /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(int argc, char *argv[]) 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/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/compiler-override/compiler.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/mac/sdkroot/test_shorthand.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 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 | set -e 7 | 8 | if ! expected=$(xcodebuild -version -sdk macosx10.6 Path 2>/dev/null) ; then 9 | expected=$(xcodebuild -version -sdk macosx10.7 Path) 10 | fi 11 | 12 | test $SDKROOT = $expected 13 | -------------------------------------------------------------------------------- /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/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/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(int argc, char *argv[]) 8 | { 9 | #ifdef __OPTIMIZE__ 10 | printf("Using an optimization flag\n"); 11 | #else 12 | printf("Using no optimization flag\n"); 13 | #endif 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /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/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(int argc, char *argv[]) { 11 | printf("%s\n", GetToolset()); 12 | printf("Shared: %s\n", GetToolsetShared()); 13 | } 14 | -------------------------------------------------------------------------------- /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(int argc, char *argv[]) 8 | { 9 | #ifdef __OPTIMIZE__ 10 | printf("Using an optimization flag\n"); 11 | #else 12 | printf("Using no optimization flag\n"); 13 | #endif 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /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/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(int argc, char *argv[]) { 14 | fwrite(data, 1, sizeof(data), stdout); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/generator-output/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/restat/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 os 8 | import sys 9 | 10 | """Cross-platform touch.""" 11 | 12 | for fname in sys.argv[1:]: 13 | if os.path.exists(fname): 14 | os.utime(fname, None) 15 | else: 16 | open(fname, 'w').close() 17 | -------------------------------------------------------------------------------- /test/same-target-name/src/all.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': 'all_exes', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'executable1.gyp:*', 12 | 'executable2.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/win/asm-files/asm-files.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': 'sources_with_asm', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'hello.cc', 12 | 'b.s', 13 | 'c.S', 14 | ], 15 | }, 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /test/no-output/src/nooutput.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': 'no_output', 9 | 'type': 'none', 10 | 'direct_dependent_settings': { 11 | 'defines': [ 12 | 'NADA', 13 | ], 14 | }, 15 | }, 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /test/same-gyp-name/library/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': 'duplicate_names', 8 | 'type': 'shared_library', 9 | 'dependencies': [ 10 | 'one/sub.gyp:one', 11 | 'two/sub.gyp:two', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/compiler-override/compiler-host.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 | 'toolset': 'host', 9 | 'target_name': 'hello', 10 | 'type': 'executable', 11 | 'sources': [ 12 | 'test.c', 13 | 'cxxtest.cc', 14 | ], 15 | }, 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /test/same-gyp-name/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_exes', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'subdir1/executable.gyp:*', 12 | 'subdir2/executable.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/restat/src/create_intermediate.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 os 8 | import sys 9 | 10 | """ 11 | Create argv[1] iff it doesn't already exist. 12 | """ 13 | 14 | outfile = sys.argv[1] 15 | if os.path.exists(outfile): 16 | sys.exit() 17 | open(outfile, "wb").close() 18 | -------------------------------------------------------------------------------- /test/subdirectory/src/subdir/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 | 'includes': [ 7 | '../symroot.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog2', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'prog2.c', 15 | ], 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/win/linker-flags/library-adjust.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_adjust', 9 | 'type': 'executable', 10 | 'libraries': [ 11 | '-lws2_32.lib' 12 | ], 13 | 'sources': ['library-adjust.cc'], 14 | }, 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /test/generator-output/rules/rules.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': 'pull_in_all_actions', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'subdir1/executable.gyp:*', 12 | 'subdir2/none.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/ios/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 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 10 | int retVal = UIApplicationMain(argc, argv, nil, nil); 11 | [pool release]; 12 | return retVal; 13 | } 14 | -------------------------------------------------------------------------------- /test/make/noload/all.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 | 'dependencies': [ 14 | 'lib/shared.gyp:shared', 15 | ], 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/same-rule-output-file-name/src/subdirs.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': 'subdirs', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'subdir1/subdir1.gyp:*', 12 | 'subdir2/subdir2.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/configurations/invalid/type.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'type': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/generator-output/actions/actions.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': 'pull_in_all_actions', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'subdir1/executable.gyp:*', 12 | 'subdir2/none.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/generator-output/rules/subdir1/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "define3.h" 3 | #include "define4.h" 4 | 5 | extern void function1(void); 6 | extern void function2(void); 7 | extern void function3(void); 8 | extern void function4(void); 9 | 10 | int main(int argc, char *argv[]) 11 | { 12 | printf("Hello from program.c\n"); 13 | function1(); 14 | function2(); 15 | printf("%s", STRING3); 16 | printf("%s", STRING4); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/subdirectory/src/subdir/subdir2/prog3.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 | 'includes': [ 7 | '../../symroot.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog3', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'prog3.c', 15 | ], 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/win/precompiled/hello.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 | // Note the abscence of a stdio.h include. This will be inserted because of the 6 | // precompiled header. 7 | 8 | extern int hello2(); 9 | 10 | int main(int argc, char *argv[]) { 11 | printf("Hello, world!\n"); 12 | hello2(); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/actions/src/subdir1/make-prog1.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 = r""" 10 | #include 11 | 12 | void prog1(void) 13 | { 14 | printf("Hello from make-prog1.py\n"); 15 | } 16 | """ 17 | 18 | open(sys.argv[1], 'w').write(contents) 19 | 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /test/actions/src/subdir1/make-prog2.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 = r""" 10 | #include 11 | 12 | void prog2(void) 13 | { 14 | printf("Hello from make-prog2.py\n"); 15 | } 16 | """ 17 | 18 | open(sys.argv[1], 'w').write(contents) 19 | 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /test/configurations/invalid/actions.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'actions': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/configurations/invalid/sources.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'sources': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/mac/missing-cfbundlesignature/Other-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | ${EXECUTABLE_NAME} 7 | CFBundlePackageType 8 | APPL 9 | CFBundleSignature 10 | F 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/same-target-name-different-directory/src/subdirs.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': 'subdirs', 9 | 'type': 'none', 10 | 'dependencies': [ 11 | 'subdir1/subdir1.gyp:*', 12 | 'subdir2/subdir2.gyp:*', 13 | ], 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /test/actions-multiple/src/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 | void bar(void); 10 | void car(void); 11 | void dar(void); 12 | void ear(void); 13 | 14 | int main() { 15 | printf("{\n"); 16 | bar(); 17 | car(); 18 | dar(); 19 | ear(); 20 | printf("}\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/configurations/invalid/libraries.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'libraries': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/configurations/invalid/target_name.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'target_name': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/generator-output/src/subdir2/deeper/deeper.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 | 'includes': [ 7 | '../../symroot.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'deeper', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'deeper.c', 15 | ], 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /tools/emacs/README: -------------------------------------------------------------------------------- 1 | How to install gyp-mode for emacs: 2 | 3 | Add the following to your ~/.emacs (replace ... with the path to your gyp 4 | checkout). 5 | 6 | (setq load-path (cons ".../tools/emacs" load-path)) 7 | (require 'gyp) 8 | 9 | Restart emacs (or eval-region the added lines) and you should be all set. 10 | 11 | Please note that ert is required for running the tests, which is included in 12 | Emacs 24, or available separately from https://github.com/ohler/ert 13 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/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 | 'includes': [ 7 | '../builddir.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog2', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'prog2.c', 15 | '../func2.c', 16 | ], 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /test/configurations/invalid/dependencies.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'dependencies': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/configurations/invalid/link_settings.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'link_settings': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/custom-generator/mygenerator.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 | """Custom gyp generator that doesn't do much.""" 6 | 7 | import gyp.common 8 | 9 | generator_default_variables = {} 10 | 11 | def GenerateOutput(target_list, target_dicts, data, params): 12 | f = open("MyBuildFile", "wb") 13 | f.write("Testing...\n") 14 | f.close() 15 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir1/make-prog1.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 = r""" 10 | #include 11 | 12 | void prog1(void) 13 | { 14 | printf("Hello from make-prog1.py\n"); 15 | } 16 | """ 17 | 18 | open(sys.argv[1], 'w').write(contents) 19 | 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /test/generator-output/actions/subdir1/make-prog2.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 = r""" 10 | #include 11 | 12 | void prog2(void) 13 | { 14 | printf("Hello from make-prog2.py\n"); 15 | } 16 | """ 17 | 18 | open(sys.argv[1], 'w').write(contents) 19 | 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /test/configurations/invalid/configurations.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'configurations': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/external-cross-compile/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 | import sys 7 | 8 | fh = open(sys.argv[1], 'w') 9 | 10 | filenames = sys.argv[2:] 11 | 12 | for filename in filenames: 13 | subfile = open(filename) 14 | data = subfile.read() 15 | subfile.close() 16 | fh.write(data) 17 | 18 | fh.close() 19 | -------------------------------------------------------------------------------- /test/ninja/use-custom-environment-files/use-custom-environment-files.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': 'test_use_custom_environment_files', 9 | 'type': 'executable', 10 | 'sources': [ 11 | 'use-custom-environment-files.cc', 12 | ], 13 | }, 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /test/toplevel-dir/src/sub1/main.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': 'prog1', 9 | 'type': 'executable', 10 | 'dependencies': [ 11 | '<(DEPTH)/../sub2/prog2.gyp:prog2', 12 | ], 13 | 'sources': [ 14 | 'prog1.c', 15 | ], 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/configurations/inheritance/configurations.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | #ifdef BASE 6 | printf("Base configuration\n"); 7 | #endif 8 | #ifdef COMMON 9 | printf("Common configuration\n"); 10 | #endif 11 | #ifdef COMMON2 12 | printf("Common2 configuration\n"); 13 | #endif 14 | #ifdef DEBUG 15 | printf("Debug configuration\n"); 16 | #endif 17 | #ifdef RELEASE 18 | printf("Release configuration\n"); 19 | #endif 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/configurations/invalid/standalone_static_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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'standalone_static_library': 1, 13 | }, 14 | } 15 | }, 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /test/mac/app-bundle/TestApp/TestAppAppDelegate.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 "TestAppAppDelegate.h" 6 | 7 | @implementation TestAppAppDelegate 8 | 9 | @synthesize window; 10 | 11 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 12 | // Insert code here to initialize your application 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /test/make_global_settings/basics/make_global_settings.gyp: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013 Google Inc. All rights reserved. 2 | # Use of this source code is governed by a BSD-style licence that can be 3 | # found in the LICENSE file. 4 | 5 | { 6 | 'make_global_settings': [ 7 | ['CC', 'clang'], 8 | ['LINK', 'clang++'], 9 | ], 10 | 'targets': [ 11 | { 12 | 'target_name': 'test', 13 | 'type': 'static_library', 14 | 'sources': [ 'foo.c' ], 15 | }, 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /test/ninja/action_dependencies/src/b.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 | 6 | #include 7 | 8 | #include "b.h" 9 | 10 | int main(int argc, char** argv) { 11 | FILE* f; 12 | if (argc < 2) 13 | return 1; 14 | f = fopen(argv[1], "wt"); 15 | fprintf(f, "#define VALUE %d\n", funcA()); 16 | fclose(f); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/rules/src/subdir4/program.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Use the assembly function in linux and mac where it is built. 4 | #if PLATFORM_LINUX || PLATFORM_MAC 5 | extern int asm_function(void); 6 | #else 7 | int asm_function() { 8 | return 41; 9 | } 10 | #endif 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | fprintf(stdout, "Hello from program.c\n"); 15 | fflush(stdout); 16 | fprintf(stdout, "Got %d.\n", asm_function()); 17 | fflush(stdout); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/win/linker-flags/deffile-multiple.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_deffile_multiple_fail', 9 | 'type': 'shared_library', 10 | 'sources': [ 11 | 'deffile.cc', 12 | 'deffile.def', 13 | 'deffile2.def', 14 | ], 15 | }, 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/subdir3/prog3.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 | 'includes': [ 7 | '../../builddir.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog3', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'prog3.c', 15 | '../../func3.c', 16 | ], 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /test/mac/missing-cfbundlesignature/Third-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleExecutable 6 | ${EXECUTABLE_NAME} 7 | CFBundlePackageType 8 | APPL 9 | CFBundleSignature 10 | some really long string 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/mac/xcode-gcc/warn_about_invalid_offsetof_macro.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 | #define offsetof(st, m) ((unsigned)((char*)&((st*)0)->m - (char*)0)) 6 | 7 | struct MyStruct { 8 | virtual void MyFunc() = 0; 9 | int my_member; 10 | }; 11 | 12 | int main() { 13 | unsigned x = offsetof(MyStruct, my_member); 14 | return x ? 0 : 1; 15 | } 16 | -------------------------------------------------------------------------------- /test/msvs/express/express.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': 'express', 9 | 'type': 'executable', 10 | 'dependencies': [ 11 | 'base/base.gyp:a', 12 | 'base/base.gyp:b', 13 | ], 14 | 'sources': [ 15 | 'main.c', 16 | ], 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /test/configurations/invalid/all_dependent_settings.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'all_dependent_settings': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/win/compiler-flags/default-char-is-unsigned.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 | template 6 | struct CompileAssert { 7 | }; 8 | 9 | #define COMPILE_ASSERT(expr, msg) \ 10 | typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] 11 | 12 | int main() { 13 | COMPILE_ASSERT(char(-1) > 0, default_char_is_unsigned); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /MANIFEST: -------------------------------------------------------------------------------- 1 | setup.py 2 | gyp 3 | LICENSE 4 | AUTHORS 5 | pylib/gyp/MSVSNew.py 6 | pylib/gyp/MSVSProject.py 7 | pylib/gyp/MSVSToolFile.py 8 | pylib/gyp/MSVSUserFile.py 9 | pylib/gyp/MSVSVersion.py 10 | pylib/gyp/__init__.py 11 | pylib/gyp/common.py 12 | pylib/gyp/input.py 13 | pylib/gyp/xcodeproj_file.py 14 | pylib/gyp/generator/__init__.py 15 | pylib/gyp/generator/gypd.py 16 | pylib/gyp/generator/gypsh.py 17 | pylib/gyp/generator/make.py 18 | pylib/gyp/generator/msvs.py 19 | pylib/gyp/generator/xcode.py 20 | -------------------------------------------------------------------------------- /test/configurations/invalid/direct_dependent_settings.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': 'configurations', 9 | 'type': 'none', 10 | 'configurations': { 11 | 'Debug': { 12 | 'direct_dependent_settings': [ 13 | ], 14 | }, 15 | } 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/win/linker-flags/entrypointsymbol.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 | // The entry point specified by link.exe /ENTRY option. 6 | extern "C" void MainEntryPoint() { 7 | } 8 | 9 | // Still needed because the linker checks for existence of one of main, wmain, 10 | // WinMain, or wMain to offer informative diagnositics. 11 | int main() { 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/actions/src/subdir3/generate_main.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 = """ 10 | #include 11 | 12 | int main(int argc, char *argv[]) 13 | { 14 | printf("Hello from generate_main.py\\n"); 15 | return 0; 16 | } 17 | """ 18 | 19 | open(sys.argv[1], 'w').write(contents) 20 | 21 | sys.exit(0) 22 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/subdir3/subdir4/prog4.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 | 'includes': [ 7 | '../../../builddir.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog4', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'prog4.c', 15 | '../../../func4.c', 16 | ], 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /test/same-source-file-name/src/prog3.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 void func(void); 8 | extern void subdir1_func(void); 9 | extern void subdir2_func(void); 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | printf("Hello from prog3.c\n"); 14 | func(); 15 | subdir1_func(); 16 | subdir2_func(); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/win/linker-flags/extra.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/make_global_settings/env-wrapper/wrapper.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 | 'make_global_settings': [ 7 | ['CC', 'clang'], 8 | ['LINK', 'clang++'], 9 | ['CC.host', 'clang'], 10 | ], 11 | 'targets': [ 12 | { 13 | 'target_name': 'test', 14 | 'type': 'static_library', 15 | 'sources': [ 'foo.c' ], 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /test/rules-variables/src/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 | extern void input_root(); 6 | extern void input_dirname(); 7 | extern void input_path(); 8 | extern void input_ext(); 9 | extern void input_name(); 10 | 11 | int main() { 12 | input_root(); 13 | input_dirname(); 14 | input_path(); 15 | input_ext(); 16 | input_name(); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/win/linker-flags/extra2.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/defines/defines-env.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 | 'variables': { 7 | 'value%': '5', 8 | }, 9 | 'targets': [ 10 | { 11 | 'target_name': 'defines', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'defines.c', 15 | ], 16 | 'defines': [ 17 | 'VALUE=<(value)', 18 | ], 19 | }, 20 | ], 21 | } 22 | 23 | -------------------------------------------------------------------------------- /test/builddir/src/subdir2/subdir3/subdir4/subdir5/prog5.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 | 'includes': [ 7 | '../../../../builddir.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog5', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'prog5.c', 15 | '../../../../func5.c', 16 | ], 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /test/mac/ldflags-libtool/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': 'ldflags_passed_to_libtool', 8 | 'type': 'static_library', 9 | 'sources': [ 'file.c', ], 10 | 'xcode_settings': { 11 | 'OTHER_LDFLAGS': [ 12 | '-fblorfen-horf-does-not-exist', 13 | ], 14 | }, 15 | }, 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /test/builddir/src/builddir.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 | 'target_defaults': { 7 | 'configurations': { 8 | 'Default': { 9 | 'msvs_configuration_attributes': { 10 | 'OutputDirectory': '<(DEPTH)\\builddir/Default', 11 | }, 12 | }, 13 | }, 14 | }, 15 | 'xcode_settings': { 16 | 'SYMROOT': '<(DEPTH)/builddir', 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /test/dependencies/b/b.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': 'b', 9 | 'type': 'static_library', 10 | 'sources': [ 11 | 'b.c', 12 | ], 13 | }, 14 | { 15 | 'target_name': 'b3', 16 | 'type': 'static_library', 17 | 'sources': [ 18 | 'b3.c', 19 | ], 20 | }, 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /test/home_dot_gyp/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 | 'variables': { 7 | 'foo%': '"fromdefault"', 8 | }, 9 | 'targets': [ 10 | { 11 | 'target_name': 'printfoo', 12 | 'type': 'executable', 13 | 'sources': [ 14 | 'printfoo.c', 15 | ], 16 | 'defines': [ 17 | 'FOO=<(foo)', 18 | ], 19 | }, 20 | ], 21 | } 22 | 23 | -------------------------------------------------------------------------------- /test/mac/postbuild-defaults/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundlePackageType 7 | APPL 8 | CFBundleSignature 9 | ???? 10 | CFBundleName 11 | ${PRODUCT_NAME} 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/subdirectory/src/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 | 'includes': [ 7 | 'symroot.gypi', 8 | ], 9 | 'targets': [ 10 | { 11 | 'target_name': 'prog1', 12 | 'type': 'executable', 13 | 'dependencies': [ 14 | 'subdir/prog2.gyp:prog2', 15 | ], 16 | 'sources': [ 17 | 'prog1.c', 18 | ], 19 | }, 20 | ], 21 | } 22 | -------------------------------------------------------------------------------- /test/win/linker-flags/nodefaultlib.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 entry point function that's excluded by removing C runtime libraries. 6 | extern "C" void mainCRTStartup() { 7 | } 8 | 9 | // Still needed because the linker checks for existence of one of main, wmain, 10 | // WinMain, or wMain to offer informative diagnositics. 11 | int main() { 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/dependencies/c/c.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': 'c_unused', 9 | 'type': 'static_library', 10 | 'sources': [ 11 | 'c.c', 12 | ], 13 | }, 14 | { 15 | 'target_name': 'd', 16 | 'type': 'static_library', 17 | 'sources': [ 18 | 'd.c', 19 | ], 20 | }, 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /test/include_dirs/src/subdir/subdir_includes.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': 'subdir_includes', 9 | 'type': 'executable', 10 | 'include_dirs': [ 11 | '.', 12 | '../inc1', 13 | 'inc2', 14 | ], 15 | 'sources': [ 16 | 'subdir_includes.c', 17 | ], 18 | }, 19 | ], 20 | } 21 | -------------------------------------------------------------------------------- /test/msvs/express/base/base.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 | }, 14 | { 15 | 'target_name': 'b', 16 | 'type': 'static_library', 17 | 'sources': [ 18 | 'b.c', 19 | ], 20 | }, 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /test/msvs/list_excluded/hello_exclude.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.cpp', 12 | 'hello_mac.cpp', 13 | ], 14 | 'conditions': [ 15 | ['OS!="mac"', {'sources!': ['hello_mac.cpp']}], 16 | ] 17 | }, 18 | ], 19 | } 20 | -------------------------------------------------------------------------------- /test/msvs/shared_output/common.gypi: -------------------------------------------------------------------------------- 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 | 'target_defaults': { 7 | 'default_configuration': 'Baz', 8 | 'configurations': { 9 | 'Baz': { 10 | 'msvs_configuration_attributes': { 11 | 'OutputDirectory': '<(DEPTH)/foo', 12 | 'IntermediateDirectory': '$(OutDir)/bar', 13 | }, 14 | }, 15 | }, 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /test/win/shard/shard.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': 'shard', 9 | 'type': 'static_library', 10 | 'msvs_shard': 4, 11 | 'sources': [ 12 | 'hello1.cc', 13 | 'hello2.cc', 14 | 'hello3.cc', 15 | 'hello4.cc', 16 | ], 17 | 'product_dir': '<(PRODUCT_DIR)', 18 | }, 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /test/copies/src/copies-updir.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': 'copies_up', 9 | 'type': 'none', 10 | 'copies': [ 11 | { 12 | 'destination': '<(PRODUCT_DIR)/../copies-out-updir', 13 | 'files': [ 14 | 'file1', 15 | ], 16 | }, 17 | ], 18 | }, 19 | ], 20 | } 21 | 22 | --------------------------------------------------------------------------------