I'd strip the old stuff out completely. Most of the time it's brittle enough to break out with a screw driver, but if it isn't then I'd recommend a brass wire brush on a drill to dig it out, if you use a metal wire brush make sure it's a thin wire one and don't run it at high RPM or you could gouge the metal. I've seen people use those thick twisted wire wheels on a grinder and gouge the metal! Once it's clean then spray a direct to metal sealer.
Then take masking tape and mask off the roof where you want the sealer to stop, so you get a clean line. I use 3M drip check and apply it on the car and then run my finger over it to make it smooth and even. I apply it twice because it tends to suck into the seam. Wait for it to completely dry before applying the second coat. Once dry remove the tape and it should look better then factory.
I put soapy-water into a spray bottle.... then I spray a little onto the sealer as I spread it with my finger. This helps it to spread evenly and not stick to my finger.