function rpp_build_demos(varargin)
    d = fullfile(getpref('rpp', 'TargetRoot'), '..', 'demos');
    cd(d)

    if nargin > 0,
        build_demo(varargin{1});
    else
        for i=dir('*.slx')',
            build_demo(i.name);
        end
    end

function build_demo(file)
    [p, n, e] = fileparts(file);
    disp(['Building ', file]);
    slbuild(n, 'StandaloneRTWTarget', 'ForceTopModelBuild', true);
