However , Mali is building a road network that will connect it to all adjacent countries and it has a railway line to Senegal .