add Makefile.inc to use ../Makefile.inc, and cleanup subdir Makefiles

This commit is contained in:
lukem 1997-10-17 13:32:28 +00:00
parent aa5b34a6f5
commit eea5ba720b
10 changed files with 12 additions and 9 deletions

View File

@ -0,0 +1,7 @@
# $NetBSD: Makefile.inc,v 1.1 1997/10/17 13:32:28 lukem Exp $
WARNS?= 0
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif

View File

@ -51,7 +51,7 @@ char **argv;
{
int opt;
while ((opt = getopt(argc, argv, "o:")) != EOF) {
while ((opt = getopt(argc, argv, "o:")) != -1) {
switch (opt) {
case 'o':
if (!freopen(optarg, "w", stdout)) {

View File

@ -220,7 +220,7 @@ main(argc, argv)
#endif
from = NULL;
while ((ch = getopt(argc, argv, "df:r:")) != EOF)
while ((ch = getopt(argc, argv, "df:r:")) != -1)
switch(ch) {
case 'd': /* Backward compatible. */
break;

View File

@ -4,5 +4,4 @@ PROG= mailstats
MAN= mailstats.8
CFLAGS+=-I${.CURDIR}/../src
.include "../../Makefile.inc"
.include <bsd.prog.mk>

View File

@ -73,7 +73,7 @@ main(argc, argv)
cfile = _PATH_SENDMAILCF;
sfile = NULL;
mnames = TRUE;
while ((ch = getopt(argc, argv, "C:f:o")) != EOF)
while ((ch = getopt(argc, argv, "C:f:o")) != -1)
{
switch (ch)
{

View File

@ -7,5 +7,4 @@ CFLAGS+=-I${.CURDIR}/../src -DNEWDB -DNOT_SENDMAIL
SRCS= makemap.c safefile.c
.PATH: ${.CURDIR}/../src
.include "../../Makefile.inc"
.include <bsd.prog.mk>

View File

@ -152,7 +152,7 @@ main(argc, argv)
#else
#define OPTIONS "Ndforv"
#endif
while ((opt = getopt(argc, argv, OPTIONS)) != EOF)
while ((opt = getopt(argc, argv, OPTIONS)) != -1)
{
switch (opt)
{

View File

@ -4,5 +4,4 @@ PROG= praliases
MAN= praliases.8
CFLAGS+=-I${.CURDIR}/../src
.include "../../Makefile.inc"
.include <bsd.prog.mk>

View File

@ -67,7 +67,7 @@ main(argc, argv)
#endif
filename = "/etc/aliases";
while ((ch = getopt(argc, argv, "f:")) != EOF)
while ((ch = getopt(argc, argv, "f:")) != -1)
switch((char)ch) {
case 'f':
filename = optarg;

View File

@ -6,5 +6,4 @@ MAN= smrsh.8
CFLAGS+=-I${.CURDIR}/../src -DNDBM -DNEWDB
CFLAGS+=-DCMDDIR=\"/usr/libexec/sm.bin\"
.include "../../Makefile.inc"
.include <bsd.prog.mk>