+/*
+ * Special rule for building and installing a Berkeley r-command
+ * We need to preserve the original copies upon installation.
+ */
+
+#define ucbprogram(pgm,objs,localdeps,syslibs,installdir) @@\
+all:: pgm @@\
+ @@\
+pgm: objs localdeps @@\
+ $(CC) $(CFLAGS) -o $@ objs syslibs @@\
+ @@\
+install:: @@\
+ -if [ ! -f concat5(${DESTDIR},installdir,/,pgm,.ucb) -a -f concat4(${DESTDIR},installdir,/,pgm) ]; then \ @@\
+ mv concat4(${DESTDIR},installdir,/,pgm) concat5(${DESTDIR},installdir,/,pgm,.ucb); fi; exit 0 @@\
+ $(INSTALLSUID) pgm concat4(${DESTDIR},installdir,/,pgm) @@\
+ @@\
+clean:: @@\
+ $(RM) pgm objs @@\
+
+