Magnetic properties of RCuAl and RNiAl compounds