Print this page
Reduce lint
OS-3280 need a way to specify the root of a native system in the lx brand
OS-3279 lx brand should allow delegated datasets
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
*** 67,76 ****
--- 67,82 ----
CERRWARN_pargs += -_gcc=-Wno-clobbered
CERRWARN_pargs += -_gcc=-Wno-type-limits
CERRWARN += $(CERRWARN_$(PROG))
+ #
+ # Common code definitions
+ #
+ COBJS = ptools_common.o
+ CINC = -I../../common
+
# pargs depends on ../../common/elfcap components
# pmadvise depends on pmap components
ELFCAP = $(SRC)/common/elfcap
PMAP = $(SRC)/cmd/ptools/pmap
*** 77,98 ****
CPPFLAGS_pargs = -I$(ELFCAP)
OBJS_pargs = elfcap.o
SRCS_pargs = $(ELFCAP)/elfcap.c
! CPPFLAGS_pmap = -I$(PMAP)
! OBJS_pmap = pmap_common.o
SRCS_pmap = $(PMAP)/pmap_common.c
! CPPFLAGS_pmadvise = -I$(PMAP)
! OBJS_pmadvise = pmap_common.o
SRCS_pmadvise = $(PMAP)/pmap_common.c
CPPFLAGS += $(CPPFLAGS_$(PROG))
OBJS += $(OBJS_$(PROG))
SRCS += $(SRCS_$(PROG))
INSTALL_NEW=
INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
$(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
.KEEP_STATE:
--- 83,128 ----
CPPFLAGS_pargs = -I$(ELFCAP)
OBJS_pargs = elfcap.o
SRCS_pargs = $(ELFCAP)/elfcap.c
! CPPFLAGS_pmap = -I$(PMAP) $(CINC)
! OBJS_pmap = pmap_common.o $(COBJS)
SRCS_pmap = $(PMAP)/pmap_common.c
! CPPFLAGS_pmadvise = -I$(PMAP) $(CINC)
! OBJS_pmadvise = pmap_common.o $(COBJS)
SRCS_pmadvise = $(PMAP)/pmap_common.c
+ CPPFLAGS_preap = $(CINC)
+ OBJS_preap = $(COBJS)
+
+ CPPFLAGS_psig = $(CINC)
+ OBJS_psig = $(COBJS)
+
+ CPPFLAGS_ptime = $(CINC)
+ OBJS_ptime = $(COBJS)
+
+ CPPFLAGS_ptree = $(CINC)
+ OBJS_ptree = $(COBJS)
+
+ CPPFLAGS_pwait = $(CINC)
+ OBJS_pwait = $(COBJS)
+
+ CPPFLAGS_pwdx = $(CINC)
+ OBJS_pwdx = $(COBJS)
+
CPPFLAGS += $(CPPFLAGS_$(PROG))
OBJS += $(OBJS_$(PROG))
SRCS += $(SRCS_$(PROG))
+ # For lint, always include ptools_common.c, but suppress the "defined but
+ # not used" error, in case a given ptool doesn't need it.
+ SRCS += ../../common/ptools_common.c
+ LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
+ LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
+
INSTALL_NEW=
INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
$(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
.KEEP_STATE:
*** 104,113 ****
--- 134,147 ----
$(COMPILE.c) -o $@ $(PMAP)/pmap_common.c
%.o: ../%.c
$(COMPILE.c) $<
+ %.o: ../../common/%.c
+ $(COMPILE.c) $<
+ $(POST_PROCESS_O)
+
all: $(PROG)
ROOTBINPROG=$(ROOTBIN)/$(PROG)
ROOTPROCBINSYMLINK=$(ROOT)/usr/proc/bin/$(PROG)