Added support for Solaris Lint.
This commit is contained in:
parent
2c684081c1
commit
a9be64e220
|
@ -38,6 +38,7 @@ LDCOMBINE = ld -r
|
||||||
LDSHARED = @LDSHARED@
|
LDSHARED = @LDSHARED@
|
||||||
AR = ar rc
|
AR = ar rc
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
MV = mv
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
C2MAN = @C2MAN@
|
C2MAN = @C2MAN@
|
||||||
LDCONFIG = @LDCONFIG@
|
LDCONFIG = @LDCONFIG@
|
||||||
|
@ -46,8 +47,9 @@ MANSPECS = -w $(TOPSRCDIR)/relay32/gdi32.spec \
|
||||||
-w $(TOPSRCDIR)/relay32/comctl32.spec \
|
-w $(TOPSRCDIR)/relay32/comctl32.spec \
|
||||||
-w $(TOPSRCDIR)/relay32/comdlg32.spec \
|
-w $(TOPSRCDIR)/relay32/comdlg32.spec \
|
||||||
-w $(TOPSRCDIR)/relay32/kernel32.spec
|
-w $(TOPSRCDIR)/relay32/kernel32.spec
|
||||||
LINT = lclint
|
LINT = @LINT@
|
||||||
LINTFLAGS = +posixlib +gnuextensions +trytorecover
|
LINTFLAGS = @LINTFLAGS@
|
||||||
|
ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL)
|
||||||
BUILD = $(TOPOBJDIR)/tools/build@PROGEXT@
|
BUILD = $(TOPOBJDIR)/tools/build@PROGEXT@
|
||||||
MAKEDEP = $(TOPOBJDIR)/tools/makedep@PROGEXT@
|
MAKEDEP = $(TOPOBJDIR)/tools/makedep@PROGEXT@
|
||||||
WINERC = $(TOPOBJDIR)/rc/winerc@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) \
|
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)
|
$(SPEC_SRCS:.spec=.spec.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS)
|
||||||
|
|
||||||
|
LINTS = $(C_SRCS:.c=.ln)
|
||||||
|
|
||||||
# Implicit rules
|
# Implicit rules
|
||||||
|
|
||||||
.SUFFIXES:
|
.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:
|
.c.glue.s:
|
||||||
$(BUILD) @BUILDFLAGS@ -o $@ -glue $<
|
$(BUILD) @BUILDFLAGS@ -o $@ -glue $<
|
||||||
|
|
||||||
|
.c.ln:
|
||||||
|
$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
|
||||||
|
|
||||||
# Rule to rebuild the resource compiler
|
# Rule to rebuild the resource compiler
|
||||||
|
|
||||||
$(WINERC) check_winerc:
|
$(WINERC) check_winerc:
|
||||||
|
@ -154,8 +161,16 @@ html: $(C_SRCS)
|
||||||
|
|
||||||
# Rule for linting
|
# Rule for linting
|
||||||
|
|
||||||
lint:
|
$(MODULE).ln : $(LINTS)
|
||||||
for i in $(C_SRCS); do $(LINT) $(LINTFLAGS) -D__WINE__ $(OPTIONS) $(DIVINCL) $(X_CFLAGS) $$i; done
|
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
|
# Misc. rules
|
||||||
|
|
||||||
|
@ -167,7 +182,7 @@ depend:: $(MAKEDEP) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||||
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(EXTRA_SRCS)
|
||||||
|
|
||||||
clean::
|
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:
|
dummy:
|
||||||
|
|
||||||
|
|
17
Makefile.in
17
Makefile.in
|
@ -104,6 +104,9 @@ DEPENDSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
||||||
# Sub-directories to run make install into
|
# Sub-directories to run make install into
|
||||||
INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
|
INSTALLSUBDIRS = $(DOCSUBDIRS) $(INCSUBDIRS)
|
||||||
|
|
||||||
|
# Sub-directories to run make lint into
|
||||||
|
LINTSUBDIRS = $(LIBSUBDIRS) $(X11SUBDIRS) $(EMUSUBDIRS) $(DOCSUBDIRS)
|
||||||
|
|
||||||
LIBOBJS = \
|
LIBOBJS = \
|
||||||
controls/controls.o \
|
controls/controls.o \
|
||||||
console/console.o \
|
console/console.o \
|
||||||
|
@ -165,6 +168,13 @@ ALT_LINK = @ALT_LINK@
|
||||||
|
|
||||||
all: Makefile Make.rules $(MAIN_TARGET)
|
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: Make.rules.in configure
|
Make.rules: Make.rules.in configure
|
||||||
|
@ -189,6 +199,9 @@ libwine.a: $(LIBOBJS) $(X11OBJS)
|
||||||
$(AR) $@ $(LIBOBJS) $(X11OBJS)
|
$(AR) $@ $(LIBOBJS) $(X11OBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
llib-lwine.ln : $(LIBLINTS) $(X11LINTS)
|
||||||
|
$(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS) $(X11LINTS)
|
||||||
|
|
||||||
libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
|
libwine.so.1.0: $(LIBOBJS) $(X11OBJS)
|
||||||
$(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
|
$(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS)
|
||||||
ln -sf $@ libwine.so
|
ln -sf $@ libwine.so
|
||||||
|
@ -218,6 +231,10 @@ $(X11OBJS) $(EMUOBJS) $(LIBOBJS): $(TOOLSUBDIRS) dummy
|
||||||
$(BUILDSUBDIRS): dummy
|
$(BUILDSUBDIRS): dummy
|
||||||
@cd $@; $(SUBMAKE)
|
@cd $@; $(SUBMAKE)
|
||||||
|
|
||||||
|
$(LIBLINTS) $(X11LINTS) $(EMULINTS): dummy
|
||||||
|
@echo $@ | sed 's%\(.*\)\/[^\/]*%cd \1 \&\& make lint%' | sh
|
||||||
|
|
||||||
|
|
||||||
install_programs: dummy
|
install_programs: dummy
|
||||||
@cd programs; $(SUBMAKE) install
|
@cd programs; $(SUBMAKE) install
|
||||||
|
|
||||||
|
|
11
configure.in
11
configure.in
|
@ -72,6 +72,16 @@ AC_PROG_LN_S
|
||||||
AC_CHECK_PROG(C2MAN,c2man,c2man,true)
|
AC_CHECK_PROG(C2MAN,c2man,c2man,true)
|
||||||
AC_PATH_PROG(LDCONFIG, ldconfig, false, /sbin:/usr/sbin:$PATH)
|
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 some libraries ****
|
||||||
|
|
||||||
dnl Check for -lm for BeOS
|
dnl Check for -lm for BeOS
|
||||||
|
@ -738,6 +748,7 @@ yes
|
||||||
if test "$ac_cv_cpp_def_i386" = "yes"
|
if test "$ac_cv_cpp_def_i386" = "yes"
|
||||||
then
|
then
|
||||||
CFLAGS="$CFLAGS -D__i386__"
|
CFLAGS="$CFLAGS -D__i386__"
|
||||||
|
LINTFLAGS="$LINTFLAGS -D__i386__"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl $GCC is set by autoconf
|
dnl $GCC is set by autoconf
|
||||||
|
|
Loading…
Reference in New Issue