Building fracton phases by Majorana manipulation