Added support for Solaris Lint.

This commit is contained in:
Patrik Stridvall 1999-07-31 17:39:44 +00:00 committed by Alexandre Julliard
parent 2c684081c1
commit a9be64e220
4 changed files with 293 additions and 207 deletions

View File

@ -38,6 +38,7 @@ LDCOMBINE = ld -r
LDSHARED = @LDSHARED@
AR = ar rc
RM = rm -f
MV = mv
MKDIR = mkdir -p
C2MAN = @C2MAN@
LDCONFIG = @LDCONFIG@
@ -46,8 +47,9 @@ MANSPECS = -w $(TOPSRCDIR)/relay32/gdi32.spec \
-w $(TOPSRCDIR)/relay32/comctl32.spec \
-w $(TOPSRCDIR)/relay32/comdlg32.spec \
-w $(TOPSRCDIR)/relay32/kernel32.spec
LINT = lclint
LINTFLAGS = +posixlib +gnuextensions +trytorecover
LINT = @LINT@
LINTFLAGS = @LINTFLAGS@
ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
BUILD = $(TOPOBJDIR)/tools/build@PROGEXT@
MAKEDEP = $(TOPOBJDIR)/tools/makedep@PROGEXT@
WINERC = $(TOPOBJDIR)/rc/winerc@PROGEXT@
@ -75,6 +77,8 @@ includedir = @includedir@/wine
OBJS = $(C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) $(RC_SRCS:.rc=.o) \
$(SPEC_SRCS:.spec=.spec.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS)
LINTS = $(C_SRCS:.c=.ln)
# Implicit rules
.SUFFIXES:
@ -113,6 +117,9 @@ OBJS = $(C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) $(RC_SRCS:.rc=.o)
.c.glue.s:
$(BUILD) @BUILDFLAGS@ -o $@ -glue $<
.c.ln:
$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
# Rule to rebuild the resource compiler
$(WINERC) check_winerc:
@ -154,8 +161,16 @@ html: $(C_SRCS)
# Rule for linting
lint:
for i in $(C_SRCS); do $(LINT) $(LINTFLAGS) -D__WINE__ $(OPTIONS) $(DIVINCL) $(X_CFLAGS) $$i; done
$(MODULE).ln : $(LINTS)
if test "$(LINTS)" ; \
then \
$(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \
$(MV) llib-l$(MODULE).ln $(MODULE).ln ; \
else \
$(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \
fi
lint:: $(MODULE).ln
# Misc. rules
@ -167,7 +182,7 @@ depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
clean::
$(RM) *.o \#*\# *~ *% .#* *.bak *.orig *.rej *.flc y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(SPEC_SRCS:.spec=.spec.c) $(GLUE:.c=.glue.s) $(PROGRAMS)
$(RM) *.o *.ln \#*\# *~ *% .#* *.bak *.orig *.rej *.flc y.tab.c y.tab.h lex.yy.c core $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.s) $(RC_SRCS:.rc=.h) $(SPEC_SRCS:.spec=.spec.c) $(GLUE:.c=.glue.s) $(PROGRAMS)
dummy:

View File

@ -104,6 +104,9 @@ DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
# Sub-directories to run make install into
INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
# Sub-directories to run make lint into
LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
LIBOBJS = \
controls/controls.o \
console/console.o \
@ -165,6 +168,13 @@ ALT_LINK = @ALT_LINK@
all: Makefile Make.rules $(MAIN_TARGET)
LIBLINTS = $(LIBOBJS:.o=.ln)
X11LINTS = $(X11OBJS:.o=.ln)
EMULINTS = $(EMUOBJS:.o=.ln)
lint:: llib-lwine.ln $(EMULINTS)
$(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
@MAKE_RULES@
Make.rules: Make.rules.in configure
@ -189,6 +199,9 @@ libwine.a: $(LIBOBJS) $(X11OBJS)
$(AR) $@ $(LIBOBJS) $(X11OBJS)
$(RANLIB) $@
llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
$(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
$(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
ln -sf $@ libwine.so
@ -218,6 +231,10 @@ $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
$(BUILDSUBDIRS): dummy
@cd $@; $(SUBMAKE)
$(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
@echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
install_programs: dummy
@cd programs; $(SUBMAKE) install

447
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -72,6 +72,16 @@ AC_PROG_LN_S
AC_CHECK_PROG(C2MAN,c2man,c2man,true)
AC_PATH_PROG(LDCONFIG, ldconfig, false, /sbin:/usr/sbin:$PATH)
dnl Check for lint
AC_CHECK_PROGS(LINT, lclint lint)
if test "$LINT" = "lint"
then
LINTFLAGS="$LINTFLAGS -errchk=%all,no%longptr64 -errhdr=%user -Ncheck=macro -Nlevel=4"
dnl LINTFLAGS='-D_SIZE_T "-Dsize_t=unsigned long" -errchk=longptr64'
fi
AC_SUBST(LINT)
AC_SUBST(LINTFLAGS)
dnl **** Check for some libraries ****
dnl Check for -lm for BeOS
@ -738,6 +748,7 @@ yes
if test "$ac_cv_cpp_def_i386" = "yes"
then
CFLAGS="$CFLAGS -D__i386__"
LINTFLAGS="$LINTFLAGS -D__i386__"
fi
dnl $GCC is set by autoconf