French President Emmanuel Macron has warned Israel against invading Lebanon.