From 2d6dc07feca4e5e3dc8333f514197573dfaefda0 Mon Sep 17 00:00:00 2001 From: wens Date: Tue, 17 Jun 2008 04:23:59 +0000 Subject: Clean up header dependencies git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4377 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- common/bbs/Makefile | 2 ++ common/bbs/file.c | 1 + common/bbs/names.c | 5 ++--- common/bbs/path.c | 3 +++ common/sys/Makefile | 2 ++ include/cmbbs.h | 5 ----- include/pttstruct.h | 2 ++ trans/Makefile | 5 +---- util/Makefile | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/common/bbs/Makefile b/common/bbs/Makefile index b93cada1..4b992b6a 100644 --- a/common/bbs/Makefile +++ b/common/bbs/Makefile @@ -10,4 +10,6 @@ LIB:= cmbbs install: +all: $(SRCROOT)/include/var.h .depend + .include diff --git a/common/bbs/file.c b/common/bbs/file.c index a423f92b..8222d1f6 100644 --- a/common/bbs/file.c +++ b/common/bbs/file.c @@ -1,3 +1,4 @@ +#include "cmsys.h" #include "cmbbs.h" int diff --git a/common/bbs/names.c b/common/bbs/names.c index d96b3b3e..68dcf101 100644 --- a/common/bbs/names.c +++ b/common/bbs/names.c @@ -1,12 +1,11 @@ /* $Id$ */ -// #include "bbs.h" #include "cmbbs.h" #include -// #include -// #include #include #include +#include "pttstruct.h" + int is_validuserid(const char *id) diff --git a/common/bbs/path.c b/common/bbs/path.c index a48d3a46..560ac793 100644 --- a/common/bbs/path.c +++ b/common/bbs/path.c @@ -6,6 +6,9 @@ #include #include #include +#include "common.h" +#include "var.h" + /* ----------------------------------------------------- */ /* set file path for boards/user home */ diff --git a/common/sys/Makefile b/common/sys/Makefile index 574ab582..7450f7d6 100644 --- a/common/sys/Makefile +++ b/common/sys/Makefile @@ -8,6 +8,8 @@ SRCROOT= ../.. SRCS:= file.c lock.c log.c net.c sort.c string.c time.c crypt.c record.c osdep.c vector.c LIB:= cmsys +all: .depend + install: .include diff --git a/include/cmbbs.h b/include/cmbbs.h index 72367a1d..52a5709e 100644 --- a/include/cmbbs.h +++ b/include/cmbbs.h @@ -1,11 +1,6 @@ #ifndef _LIBBBS_H_ #define _LIBBBS_H_ -#include "config.h" -#include "common.h" -#include "cmsys.h" -#include "pttstruct.h" - /* name.c */ extern int is_validuserid(const char *id); diff --git a/include/pttstruct.h b/include/pttstruct.h index 1f4c311d..1743f5bd 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -2,6 +2,8 @@ #ifndef INCLUDE_STRUCT_H #define INCLUDE_STRUCT_H +#include "cmsys.h" // for time4_t +#include "config.h" // various sizes in SHM #include "statistic.h" // for MAX_STATS #define IDLEN 12 /* Length of bid/uid */ diff --git a/trans/Makefile b/trans/Makefile index e4f2c7eb..50294ff4 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -33,10 +33,7 @@ LIBS+= $(SRCROOT)/common/sys/libcmsys.a \ $(SRCROOT)/common/bbs/libcmbbs.a -all: ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL} ${PROGS} - -$(SRCROOT)/include/var.h: $(SRCROOT)/mbbsd/var.c - cd $(SRCROOT)/mbbsd; $(MAKE) $(SRCROOT)/include/var.h +all: $(SRCROOT)/include/var.h ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL} ${PROGS} .for fn in ${CPROG_WITH_UTIL} ${fn}: ${BBSBASE} ${fn}.c ${UTIL_OBJS} diff --git a/util/Makefile b/util/Makefile index 0ac9516f..5c418c0f 100644 --- a/util/Makefile +++ b/util/Makefile @@ -48,7 +48,7 @@ LDLIBS+= $(SRCROOT)/common/sys/libcmsys.a \ $(SRCROOT)/common/bbs/libcmbbs.a -all: ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL} ${PROGS} +all: ${SRCROOT}/include/var.h ${CPROG_WITH_UTIL} ${CPROG_WITHOUT_UTIL} ${CPP_WITH_UTIL} ${PROGS} .for fn in ${CPROG_WITH_UTIL} ${fn}: ${BBSBASE} ${fn}.c ${UTIL_OBJS} -- cgit v1.2.3