From: John Kohl Date: Thu, 25 Apr 1991 11:00:17 +0000 (+0000) Subject: updates for Krb5 install support X-Git-Tag: krb5-1.0-alpha5~68 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eca835cd96f33f33ffda4dce31f631a00be68de3;p=krb5.git updates for Krb5 install support git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2033 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/config/Imake.rules b/src/config/Imake.rules index f55c0f017..daf7ac3f9 100644 --- a/src/config/Imake.rules +++ b/src/config/Imake.rules @@ -420,7 +420,7 @@ install:: program @@\ */ #ifndef InstallProgram #define InstallProgram(program,dest) @@\ -InstallProgramWithFlags(program,dest, /**/) +InstallProgramWithFlags(program,dest/program, /**/) #endif /* InstallProgram */ diff --git a/src/config/Project.tmpl b/src/config/Project.tmpl index 0b099c6ee..9fb1ecbf5 100644 --- a/src/config/Project.tmpl +++ b/src/config/Project.tmpl @@ -190,6 +190,116 @@ lib/**/libname.a: objlist @@\ $(LN) ../$(CURRENT_DIR)/lib/**/libname.a $(TOP)/lib/lib/**/libname.a #endif /* Krb5LibraryTarget */ + +/* + * Krb5InstallManPage - generate rules to install the indicated manual page, + * giving it an alternate suffix. + */ +#ifndef Krb5InstallManPage +#define Krb5InstallManPage(file,destdir,suffix) @@\ +install.man:: file.M @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.M destdir/file.suffix +#endif /* Krb5InstallManPage */ + +/* + * Krb5SimpleProgramTarget - generate rules for compiling and linking programs + * that only have one C source file. It should only be used in Imakefiles + * that describe a single program. + * takes extra arguments beyond SimpleProgramTarget which specify where + * to put manpages & binaries + */ +#ifndef Krb5SimpleProgramTarget +#define Krb5SimpleProgramTarget(program,bindir,mandir,mansuffix) @@\ + OBJS = program.o @@\ + SRCS = program.c @@\ + @@\ +Krb5ComplexProgramTarget(program,bindir,mandir,mansuffix) +#endif /* Krb5SimpleProgramTarget */ + +#ifndef Krb5AdminProgramTarget +#define Krb5AdminProgramTarget(program) @@\ +Krb5SimpleProgramTarget(program,$(ADMIN_BINDIR),$(ADMIN_MANDIR),$(ADMIN_MANSUFFIX)) +#endif /* Krb5AdminProgramTarget */ + +#ifndef Krb5ClientProgramTarget +#define Krb5ClientProgramTarget(program) @@\ +Krb5SimpleProgramTarget(program,$(CLIENT_BINDIR),$(CLIENT_MANDIR),$(CLIENT_MANSUFFIX)) +#endif /* Krb5ClientProgramTarget */ + +#ifndef Krb5InstallAdminProgram +#define Krb5InstallAdminProgram(program) @@\ +InstallProgram(program,$(ADMIN_BINDIR)) @@\ +Krb5InstallManPage(program,$(ADMIN_MANDIR),$(ADMIN_MANSUFFIX)) +#endif /* Krb5InstallAdminProgram */ + +#ifndef Krb5InstallServerProgram +#define Krb5InstallServerProgram(program) @@\ +InstallProgram(program,$(SERVER_BINDIR)) @@\ +Krb5InstallManPage(program,$(SERVER_MANDIR),$(SERVER_MANSUFFIX)) +#endif /* Krb5InstallAdminProgram */ + +#ifndef Krb5InstallClientProgram +#define Krb5InstallClientProgram(program) @@\ +InstallProgram(program,$(CLIENT_BINDIR)) @@\ +Krb5InstallManPage(program,$(CLIENT_MANDIR),$(CLIENT_MANSUFFIX)) +#endif /* Krb5InstallAdminProgram */ + +/* + * Krb5ComplexProgramTarget - generate rules for compiling and linking the + * program specified by $(OBJS) and $(SRCS), installing the program and its + * man page, and generating dependencies. It should only be used in + * Imakefiles that describe a single program. + * Provides extra arguments to set manpage & binary locations + */ + +#ifndef Krb5ComplexProgramTarget +#define Krb5ComplexProgramTarget(program,bindir,mandir,mansuffix) @@\ + PROGRAM = program @@\ + @@\ +AllTarget(program) @@\ + @@\ +program: $(OBJS) $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\ + @@\ +SaberProgramTarget(program,$(SRCS),$(OBJS),$(LOCAL_LIBRARIES), /**/) @@\ + @@\ +InstallProgram(program,bindir) @@\ +Krb5InstallManPage(program,mandir,mansuffix) @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + $(RM) $(PROGRAM) +#endif /* Krb5ComplexProgramTarget */ + + +/* + * SimpleTestProgramTarget - generate rules for compiling and linking + * a test program, but don't include any install rules. + * cf. SimpleProgramTarget, ComplexProgramTarget + */ +#ifndef SimpleTestProgramTarget +#define SimpleTestProgramTarget(program) @@\ + OBJS = program.o @@\ + SRCS = program.c @@\ + PROGRAM = program @@\ + @@\ +AllTarget(program) @@\ + @@\ +program: $(OBJS) $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\ + @@\ +SaberProgramTarget(program,$(SRCS),$(OBJS),$(LOCAL_LIBRARIES), /**/) @@\ + @@\ +DependTarget() @@\ +LintTarget() @@\ + @@\ +clean:: @@\ + $(RM) $(PROGRAM) +#endif /* ComplexProgramTarget */ + #if HasPosixTermios P_TERMIOS=-DHasPosixTermiosTrue #else @@ -321,3 +431,13 @@ P_NPROTO=-UUseNarrowPrototypes MK_CMDS = MkCmdsCmd COMERRLIB = ComErrLib COMPILE_ET = CompileEtCmd + + ADMIN_BINDIR = AdminBindir + ADMIN_MANSUFFIX = AdminManSuffix + ADMIN_MANDIR = AdminMandir + SERVER_BINDIR = ServerBindir + SERVER_MANSUFFIX = ServerManSuffix + SERVER_MANDIR = ServerMandir + CLIENT_BINDIR = ClientBindir + CLIENT_MANSUFFIX = ClientManSuffix + CLIENT_MANDIR = ClientMandir diff --git a/src/config/site.def b/src/config/site.def index 26c18a74e..9d63dc678 100644 --- a/src/config/site.def +++ b/src/config/site.def @@ -15,6 +15,8 @@ * Make sure you check the following parameters: * * * * 1. HasLargeTmp * + * 2. All the manpage locations & suffixes * + * 3. All the binary install locations * * * * Note on using DESTDIR: If you want to install into a scratch directory * * but will eventually move the tree back to the root, compile with DESTDIR * @@ -40,6 +42,53 @@ #define HasLargeTmp YES #endif +/* + * 2. Man page locations & suffixes. + */ +/* AdminManSuffix: man page suffix for administrative programs */ +#ifndef AdminManSuffix +#define AdminManSuffix 8 +#endif +/* AdminMandir: manual page directory for administrative man pages */ +#ifndef AdminMandir +#define AdminMandir /krb5/man/man8 +#endif + +/* ServerManSuffix: man page suffix for server programs */ +#ifndef ServerManSuffix +#define ServerManSuffix 8 +#endif +/* ServerMandir: manual page directory for server man pages */ +#ifndef ServerMandir +#define ServerMandir /krb5/man/man8 +#endif + +/* ClientManSuffix: man page suffix for client programs */ +#ifndef ClientManSuffix +#define ClientManSuffix 1 +#endif +/* ClientMandir: manual page directory for client man pages */ +#ifndef ClientMandir +#define ClientMandir /krb5/man/man1 +#endif + +/* + * 3. Binary program install areas. + */ +/* AdminBindir: binary install directory for administrative programs */ +#ifndef AdminBindir +#define AdminBindir /krb5/admin +#endif + +/* ServerBindir: binary install directory for server programs */ +#ifndef ServerBindir +#define ServerBindir /krb5/sbin +#endif + +/* ClientBindir: binary install directory for client programs */ +#ifndef ClientBindir +#define ClientBindir /krb5/bin +#endif /***************************************************************************** * *