pmake error on ubuntu

ubuntu 에서 pmake 를 사용하던 도중, 아래의 오류가 나타났다.

library 를 컴파일하는 과정이었는데, 필요한 library는 모두 만들어 놓고, 아래의 오류를 나타내고 죽어버렸다.

building shared object ipvutil library

ranlib libipvutil_pic.a

lint -chapbxzF  -i strlcat.c

pmake: exec(lint) failed (No such file or directory)

lint 프로그램을 찾을 수 없다는 메시지였는데.. lint 가 무슨 프로그램인지 알 수 없었다. 결국 구글링..

http://en.wikipedia.org/wiki/Lint_%28software%29

즉, lint 는 일종의 cppcheck 와 같은 코드 검사기 같은 것이다.

하지만 lint는 bsd-unix 와 같은 unix 계열의 os 에서 주로 사용되는 검사기였다. 즉, ubuntu에는 기본이 아니라는 이야기..

lint 와 같은 역할을 하는 것으로 linux 에서는 splint 가 있어서 설치 한 뒤, ln 명령어로 lint 명령을 사용할 수 있도록 구성했으나, splint 및 lint 의 정확한 사용법을 모르는 상태에서  기본적으로 사용되는 옵션등이 맞지 않아 계속 오류를 나타냈다.

결국 lint 검사를 사용하지 않도록 하고 mk 파일 내용을 수정하는 것으로 해결을 했다.

/usr/share/mk 디렉토리에 있는 bsd.own.mk 파일을 다음과 같이 수정하도록 하자. 굵은 글씨로 나타낸 부분이 lint 사용을 막기 위해 추가한 부분이다.

#       $NetBSD: bsd.own.mk,v 1.120 1999/02/24 14:42:36 drochner Exp $

.if !defined(_BSD_OWN_MK_)

_BSD_OWN_MK_=1

.if defined(MAKECONF) && exists(${MAKECONF})

.include “${MAKECONF}”

.elif exists(/etc/mk.conf)

.include “/etc/mk.conf”

.endif

NOLINT=

Installing bsdmake on ubuntu

프로젝트를 진행하면서 bsd-make(bmake)를 사용할 일이 생겼다.

당연히 ubuntu에서 사용가능한 bmake package 를 찾아봤으나… 아무래도 보이지 않았다.

한참을 찾고 찾아도 도저히 보이지 않아 결국, Chris 에게 도움을 요청했다.

내 설명을 들은 Chris가 구글에서 debian bmake 를 검색하니 바로 나왔다..(그동안 나는 ubuntu 와 bmake 키워드를 가지고 계속 삽질을 하고 있었다.)

결국 너무 늦은시간이라 회사에서는 해결을 못하고, 집에와서 다시금 찾아보니 답이 나왔다.

정답은…

$ sudo apt-get install pmake

pmake 였던 것이다.. -_-;;

$ man pmake

MAKE(1)                                                                                                BSD General Commands Manual                                                                                                MAKE(1)

NAME

     pmake — maintain program dependencies

SYNOPSIS

     pmake [-BeikNnqrstWX] [-D variable] [-d flags] [-f makefile] [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file] [-V variable] [variable=value] [target …]

DESCRIPTION

     pmake is a program designed to simplify the maintenance of other programs.  Its input is a list of specifications as to the files upon which programs and other files depend.  If the file ‘makefile’ exists, it is read for this

     list of specifications.  If it does not exist, the file ‘Makefile’ is read.  If the file ‘.depend’ exists, it is read (see mkdep(1)).

     This manual page is intended as a reference document only.  For a more thorough description of pmake and makefiles, please refer to Make – A Tutorial.