From 84db7f03d1d700792dc5aed3df3384ee3e7e86a8 Mon Sep 17 00:00:00 2001 From: Keith Vetter Date: Fri, 17 Mar 1995 00:36:43 +0000 Subject: [PATCH] Top level makefile changes for the PC--now builds the whole world git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5136 dc483132-0cff-0310-8789-dd5450dbe970 --- src/{CHANGELOG => CHANGES} | 0 src/ChangeLog | 6 +++ src/Makefile.in | 101 ++++++++++++++++++++++++++++++++++--- src/wconfig.c | 88 ++++++++++++++++++++++++++++++++ 4 files changed, 189 insertions(+), 6 deletions(-) rename src/{CHANGELOG => CHANGES} (100%) create mode 100644 src/wconfig.c diff --git a/src/CHANGELOG b/src/CHANGES similarity index 100% rename from src/CHANGELOG rename to src/CHANGES diff --git a/src/ChangeLog b/src/ChangeLog index 14e459cb7..3191ca39d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +Thu Mar 16 15:15:00 1995 Keith Vetter + + * Makefile.in: added PC stuff so it builds the whole world. + * wconfig.h: program to configure makefiles on the PC. + * CHANGELOG -> CHANGES: renamed to avoid PC name conflict. + Tue Mar 7 19:49:07 1995 Mark Eichin * aclocal.m4 (UsePepsy, PepsyTarget): removed, not referenced diff --git a/src/Makefile.in b/src/Makefile.in index 80bfe4c61..1b8d27b8e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -17,14 +17,31 @@ SRCS = 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) \ @@ -58,7 +75,10 @@ mastermakefiles:: TAGS: $(SRCS) etags $(SRCS) -clean:: +clean:: clean-$(WHAT) + +clean-:: clean-unix +clean-unix:: rm -f *.o core mostlyclean: clean @@ -80,3 +100,72 @@ dist: $(DISTFILES) 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 + .\wconfig config include\makefile + .\wconfig config include\krb5\makefile + .\wconfig config lib\makefile + .\wconfig config lib\crypto\makefile + .\wconfig config lib\crypto\crc32\makefile + .\wconfig config lib\crypto\des\makefile + .\wconfig config lib\crypto\md4\makefile + .\wconfig config lib\crypto\md5\makefile + .\wconfig config lib\crypto\os\makefile + .\wconfig config lib\des425\makefile + .\wconfig config lib\gssapi\makefile + .\wconfig config lib\gssapi\generic\makefile + .\wconfig config lib\gssapi\krb5\makefile + .\wconfig config lib\krb5\makefile + .\wconfig config lib\krb5\asn.1\makefile + .\wconfig config lib\krb5\ccache\makefile + .\wconfig config lib\krb5\ccache\file\makefile + .\wconfig config lib\krb5\ccache\stdio\makefile + .\wconfig config lib\krb5\error_ta\makefile + .\wconfig config lib\krb5\free\makefile + .\wconfig config lib\krb5\keytab\makefile + .\wconfig config lib\krb5\keytab\file\makefile + .\wconfig config lib\krb5\krb\makefile + .\wconfig config lib\krb5\os\makefile + .\wconfig config lib\krb5\posix\makefile + .\wconfig config lib\krb5\rcache\makefile + .\wconfig config lib\krb425\makefile + .\wconfig config 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 + diff --git a/src/wconfig.c b/src/wconfig.c new file mode 100644 index 000000000..cd7829326 --- /dev/null +++ b/src/wconfig.c @@ -0,0 +1,88 @@ +/* + * 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 [] output + * + */ + +#include +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; +} -- 2.26.2