$(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
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
* 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 *
#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
/*****************************************************************************
* *