static void compileProfile(Properties props, String profile,
            CachingProtoLoader loader,
            Properties globalOptions, String[] rootProfileOptions,
            final int nestCount) throws Exception
    {
        String moduleString = props.getProperty(profile);
        if (moduleString == null || moduleString.length() == 0)
        {
            throw new RuntimeException("No modules for profile: " + profile);
        }

        for (int i = 0; i < nestCount; i++)
        {
            System.out.print("  ");
        }
        System.out.println(profile);

        final long start = System.nanoTime();

        String profileOptionsParam = props.getProperty(profile + ".options");
        String[] profileOptions = profileOptionsParam == null ? null :
                COMMA.split(profileOptionsParam);

        for (String m : COMMA.split(moduleString))
        {
            m = m.trim();

            if (m.charAt(0) == '@')
            {
                // referencing another profile
                compileProfile(props, m, loader, globalOptions,
                        nestCount == 0 ? profileOptions : rootProfileOptions,
                        nestCount + 1);
                continue;
            }

            compile(loadModule(props, m, loader, null, null,
                    globalOptions, profileOptions,
                    nestCount == 0 ? profileOptions : rootProfileOptions));
        }

        final long end = System.nanoTime();

        for (int i = 0; i < nestCount; i++)
        {
            System.out.print("  ");
        }

        long ms = (end - start) / 1000000;
        System.out.println(ms + " ms\n");
    }
The main execution point of compiling protos.

@author David Yu
@created Jan 5, 2010
protostuff-compiler/src/main/java/io/protostuff/compiler/CompilerMain.java