From 04a7994dc48e346c4b554c515e2a89019bb3022f Mon Sep 17 00:00:00 2001 From: Andreas Klemm Date: Fri, 1 May 1998 09:51:31 +0000 Subject: [PATCH] Style: - Makefiles shouldn't have copyrights. - $Id$ should be preceded by a tab. - Don't include ../Makefile.inc when it is not used explicitly. - Use the normal amount of horizontal and vertical whitspace (1 tab/none). - Don't override the (correct) default for MAN1. - Use the correct order for -I paths. - Don't use += to initialize SUBDIR. - use the config.h generated by `configure' and don't use a huge CFLAGS statement. I think the other Makefiles under src/gnu needs some polishing as well ;-) Thanks to Bruce, everythig looks smarter now. Obtained from: Bruce Evans --- gnu/usr.bin/dc/Makefile | 27 +++++----------- gnu/usr.bin/dc/config.h | 72 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 76 insertions(+), 23 deletions(-) diff --git a/gnu/usr.bin/dc/Makefile b/gnu/usr.bin/dc/Makefile index 509be76dcd0f..60b8b97022b8 100644 --- a/gnu/usr.bin/dc/Makefile +++ b/gnu/usr.bin/dc/Makefile @@ -1,26 +1,15 @@ -# Makefile copyright Andreas Klemm 1998 -# -# $Id: Makefile,v 1.6 1998/04/29 22:14:40 andreas Exp $ - -.include "${.CURDIR}/../Makefile.inc" +# $Id$ .PATH: ${.CURDIR}/../../../contrib/bc/dc \ ${.CURDIR}/../../../contrib/bc/lib \ ${.CURDIR}/../../../contrib/bc/doc -PROG= dc -SRCS= array.c dc.c eval.c misc.c numeric.c stack.c string.c \ - getopt.c getopt1.c number.c -MAN1= dc.1 - -CFLAGS+= -DHAVE_VPRINTF=1 -DSTDC_HEADERS=1 -DHAVE_ISGRAPH=1 \ - -DHAVE_LIMITS_H=1 -DHAVE_STDARG_H=1 -DHAVE_STDDEF_H=1 \ - -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 \ - -I${.CURDIR}/../../../contrib/bc/h -I${.CURDIR} - -DPADD= ${LIBM} -LDADD= -lm - -SUBDIR+= doc +PROG= dc +SRCS= array.c dc.c eval.c misc.c numeric.c stack.c string.c \ + getopt.c getopt1.c number.c +CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../../contrib/bc/h +DPADD= ${LIBM} +LDADD= -lm +SUBDIR= doc .include diff --git a/gnu/usr.bin/dc/config.h b/gnu/usr.bin/dc/config.h index abdc7024855e..76ac67e75889 100644 --- a/gnu/usr.bin/dc/config.h +++ b/gnu/usr.bin/dc/config.h @@ -1,5 +1,69 @@ -/* config.h */ -#ifndef __STDC__ -#define VARARGS -#endif +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define if on MINIX. */ +/* #undef _MINIX */ + +/* Define if the system does not provide POSIX.1 features except + with this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define if you need to in order for stat and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if lex declares yytext as a char * by default, not a char[]. */ #define YYTEXT_POINTER 1 + +/* PACKAGE name */ +#define PACKAGE "bc" + +/* Package VERSION number */ +#define VERSION "1.04" + +/* define if the math lib is to be loaded from a file. */ +/* #undef BC_MATH_FILE */ + +/* Define to use the readline library. */ +/* #undef READLINE */ + +/* Define to `size_t' if and don't define. */ +/* #undef ptrdiff_t */ + +/* Define if you have the isgraph function. */ +#define HAVE_ISGRAPH 1 + +/* Define if you have the header file. */ +/* #undef HAVE_LIB_H */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1