On the generation of m-compositions and m-partitions