DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in
-
-all::
+all:: all-$(WHAT)
+
+all-unix::
+
+all-: all-windows
+all-windows:: makefile-windows
+ @echo Making in include
+ cd include
+ -$(MAKE) -$(MAKEFLAGS)
+ @echo Making in util\et
+ cd ..\util\et
+ -$(MAKE) -$(MAKEFLAGS)
+ @echo Making in lib
+ cd ..\..\lib
+ -$(MAKE) -$(MAKEFLAGS)
+ @echo Making in windows\cns
+ cd ..\windows\cns
+ -$(MAKE) -$(MAKEFLAGS)
+ cd ..\..
world::
date
- make ${MFLAGS} mastermakefiles
- make ${MFLAGS} depend
- make ${MFLAGS} all
+ make $(MFLAGS) mastermakefiles
+ make $(MFLAGS) depend
+ make $(MFLAGS) all
date
INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
TAGS: $(SRCS)
etags $(SRCS)
-clean::
+clean:: clean-$(WHAT)
+
+clean-:: clean-unix
+clean-unix::
rm -f *.o core
mostlyclean: clean
done
tar chzf `cat .fname`.tar.gz `cat .fname`
rm -rf `cat .fname` .fname
+
+makefile-windows:: wconfig.c config\pre.in config\post.in makefile.in \
+ include\makefile.in include\krb5\makefile.in \
+ lib\makefile.in lib\crypto\makefile.in \
+ lib\crypto\crc32\makefile.in lib\crypto\des\makefile.in \
+ lib\crypto\md4\makefile.in lib\crypto\md5\makefile.in \
+ lib\crypto\os\makefile.in lib\des425\makefile.in \
+ lib\gssapi\makefile.in lib\gssapi\generic\makefile.in \
+ lib\gssapi\krb5\makefile.in lib\krb5\makefile.in \
+ lib\krb5\asn.1\makefile.in lib\krb5\ccache\makefile.in \
+ lib\krb5\ccache\file\makefile.in \
+ lib\krb5\ccache\stdio\makefile.in \
+ lib\krb5\error_ta\makefile.in \
+ lib\krb5\free\makefile.in lib\krb5\keytab\makefile.in \
+ lib\krb5\keytab\file\makefile.in lib\krb5\krb\makefile.in \
+ lib\krb5\os\makefile.in lib\krb5\posix\makefile.in \
+ lib\krb5\rcache\makefile.in lib\krb425\makefile.in \
+ util\et\makefile.in
+ SET CL=/nologo
+ $(CC) /AL wconfig.c
+ copy Makefile Makefile.bak
+ .\wconfig config <makefile.in >makefile
+ .\wconfig config <include\makefile.in >include\makefile
+ .\wconfig config <include\krb5\makefile.in >include\krb5\makefile
+ .\wconfig config <lib\makefile.in >lib\makefile
+ .\wconfig config <lib\crypto\makefile.in >lib\crypto\makefile
+ .\wconfig config <lib\crypto\crc32\makefile.in >lib\crypto\crc32\makefile
+ .\wconfig config <lib\crypto\des\makefile.in >lib\crypto\des\makefile
+ .\wconfig config <lib\crypto\md4\makefile.in >lib\crypto\md4\makefile
+ .\wconfig config <lib\crypto\md5\makefile.in >lib\crypto\md5\makefile
+ .\wconfig config <lib\crypto\os\makefile.in >lib\crypto\os\makefile
+ .\wconfig config <lib\des425\makefile.in >lib\des425\makefile
+ .\wconfig config <lib\gssapi\makefile.in >lib\gssapi\makefile
+ .\wconfig config <lib\gssapi\generic\makefile.in >lib\gssapi\generic\makefile
+ .\wconfig config <lib\gssapi\krb5\makefile.in >lib\gssapi\krb5\makefile
+ .\wconfig config <lib\krb5\makefile.in >lib\krb5\makefile
+ .\wconfig config <lib\krb5\asn.1\makefile.in >lib\krb5\asn.1\makefile
+ .\wconfig config <lib\krb5\ccache\makefile.in >lib\krb5\ccache\makefile
+ .\wconfig config <lib\krb5\ccache\file\makefile.in >lib\krb5\ccache\file\makefile
+ .\wconfig config <lib\krb5\ccache\stdio\makefile.in >lib\krb5\ccache\stdio\makefile
+ .\wconfig config <lib\krb5\error_ta\makefile.in >lib\krb5\error_ta\makefile
+ .\wconfig config <lib\krb5\free\makefile.in >lib\krb5\free\makefile
+ .\wconfig config <lib\krb5\keytab\makefile.in >lib\krb5\keytab\makefile
+ .\wconfig config <lib\krb5\keytab\file\makefile.in >lib\krb5\keytab\file\makefile
+ .\wconfig config <lib\krb5\krb\makefile.in >lib\krb5\krb\makefile
+ .\wconfig config <lib\krb5\os\makefile.in >lib\krb5\os\makefile
+ .\wconfig config <lib\krb5\posix\makefile.in >lib\krb5\posix\makefile
+ .\wconfig config <lib\krb5\rcache\makefile.in >lib\krb5\rcache\makefile
+ .\wconfig config <lib\krb425\makefile.in >lib\krb425\makefile
+ .\wconfig config <util\et\makefile.in >util\et\makefile
+ config\rm.bat wconfig.obj wconfig.exe
+
+clean-windows::
+ @echo Making clean in include
+ cd include
+ -$(MAKE) -$(MAKEFLAGS) clean
+ @echo Making clean in util\et
+ cd ..\util\et
+ -$(MAKE) -$(MAKEFLAGS) clean
+ @echo Making clean in lib
+ cd ..\..\lib
+ -$(MAKE) -$(MAKEFLAGS) clean
+ @echo Making clean in windows\cns
+ cd ..\windows\cns
+ -$(MAKE) -$(MAKEFLAGS) clean
+ cd ..\..
+ @echo Making clean locally
+ config\rm.bat *.obj msvc.pdb *.err wconfig.obj wconfig.exe
+
--- /dev/null
+/*
+ * wconfig.c
+ *
+ * Copyright 1995 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ *
+ * Program to take the place of the configure shell script under DOS.
+ * The makefile.in files are constructed in such a way that all this
+ * program needs to do is uncomment lines beginning ##DOS by removing the
+ * first 5 characters of the line. This will allow lines like:
+ * ##DOS!include windows.in to become: !include windows.in
+ *
+ * If a config directory is specified, then the output will be start with
+ * config\pre.in, then the filtered stdin text, and will end with
+ * config\post.in.
+ *
+ * Syntax: wconfig [<config directory>] <input >output
+ *
+ */
+
+#include <stdio.h>
+static char buf [1024];
+static int copy_file (char *path, char *fname);
+
+int main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int l;
+ char *ptr;
+
+ if (argc == 2) /* Config directory given */
+ copy_file (argv[1], "\\pre.in"); /* Send out prefix */
+
+ while ((ptr = gets(buf)) != NULL) { /* Filter stdin */
+ if (memcmp ("##DOS", buf, 5) == 0)
+ ptr += 5;
+ puts (ptr);
+ }
+
+ if (argc == 2) /* Config directory given */
+ copy_file (argv[1], "\\post.in"); /* Send out postfix */
+
+ return 0;
+}
+/*
+ *
+ * Copy_file
+ *
+ * Copies file 'path\fname' to stdout.
+ *
+ */
+static int
+copy_file (char *path, char *fname) {
+ FILE *fin;
+
+ strcpy (buf, path); /* Build up name to open */
+ strcat (buf, fname);
+
+ fin = fopen (buf, "r"); /* File to read */
+ if (fin == NULL)
+ return 1;
+
+ while (fgets (buf, sizeof(buf), fin) != NULL) { /* Copy file over */
+ fputs (buf, stdout);
+ }
+
+ fclose (fin);
+
+ return 0;
+}