From: wesommer Date: Wed, 18 Jan 1989 21:06:35 +0000 (+0000) Subject: Add "ucbprogram" macro, plus support for it. X-Git-Tag: KREL1~10 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/83791534b7e41e3951ebbf6c5f70d44ff22afd84?hp=eeb9c8803c9f6f01dac2b5c36c62271d661602e8 Add "ucbprogram" macro, plus support for it. --- diff --git a/util/imake.includes/Imake.rules b/util/imake.includes/Imake.rules index 75b1f915..7aff9fc1 100644 --- a/util/imake.includes/Imake.rules +++ b/util/imake.includes/Imake.rules @@ -7,11 +7,13 @@ #define concat(x,y) x##y #define concat3(x,y,z) x##y##z #define concat4(w,x,y,z) w##x##y##z +#define concat5(v,w,x,y,z) v##w##x##y##z #define requote(x) #x #else #define concat(x,y)x/**/y #define concat3(x,y,z)x/**/y/**/z #define concat4(w,x,y,z)w/**/x/**/y/**/z +#define concat5(v,w,x,y,z)v/**/w/**/x/**/y/**/z #define requote(x) "x" #endif @@ -140,7 +142,7 @@ install:: @@\ all:: pgm @@\ @@\ pgm: objs localdeps @@\ - $(CC) $(CFLAGS) -o $@ objs localdeps syslibs @@\ + $(CC) $(CFLAGS) -o $@ objs syslibs @@\ @@\ clean:: @@\ $(RM) pgm objs @@\ @@ -315,6 +317,26 @@ install:: @@\ clean:: @@\ $(RM) pgm objs @@\ +/* + * 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 @@\ + + /* * Rule for installing man pages. Section installing into should match * suffix, or the man page won't show up when using man(1).