updates for Krb5 install support
authorJohn Kohl <jtkohl@mit.edu>
Thu, 25 Apr 1991 11:00:17 +0000 (11:00 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 25 Apr 1991 11:00:17 +0000 (11:00 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2033 dc483132-0cff-0310-8789-dd5450dbe970

src/config/Imake.rules
src/config/Project.tmpl
src/config/site.def

index f55c0f01726199fc1380f7c9ddb1986e13047607..daf7ac3f9fd67be14b5375a1d007653ced106f6d 100644 (file)
@@ -420,7 +420,7 @@ install:: program                                                   @@\
  */
 #ifndef InstallProgram
 #define        InstallProgram(program,dest)                                    @@\
-InstallProgramWithFlags(program,dest, /**/)
+InstallProgramWithFlags(program,dest/program, /**/)
 #endif /* InstallProgram */
 
 
index 0b099c6ee2fb5bfb89098791e4dc58a791fb1145..9fb1ecbf56f69d712897ef2f3bb6dd3f6d0bf43a 100644 (file)
@@ -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
index 26c18a74e72d0e48f24a07d7635a36e263ef5362..9d63dc67889b71bda91d84e7fa5d44d768d901a4 100644 (file)
@@ -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  *
 #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
 
 /*****************************************************************************
  *                                                                           *