Make problem

Paul Schmehl pauls at utdallas.edu
Thu Feb 10 18:47:45 PST 2005


I'm working on a port of sancp (http://www.metre.net/).  It's a bit odd. 
There's no configure script.  There *is* a Makefile, but the INSTALL 
instructions are to simply type "make" and then run the install.sh script 
to install.

When I try to run make install PREFIX=/var/tmp/sancp/ to test building the 
port, I get the following error:

make: Don't know how to make all. Stop

I've googled for this, but can't find anything apropos.  Anyone care to 
give me a hint?

Here's the port Makefile:

# New ports collection makefile for:    sancp
# Date created:                         10 Feb 2005
# Whom:                                 pauls
#
# $FreeBSD$
#

PORTNAME=       sancp
PORTVERSION=    1.6.1
CATEGORIES=     security
MASTER_SITES=   http://www.metre.net/
MASTER_SITE_SUBDIR=     files

MAINTAINER=     pauls at utdallas.edu
COMMENT=        A network connection profiler

PKGINSTALL=    ${WRKDIR}/pkg-install
LOG_DIR=        ${LOGDIR}/sancp

LIB_DEPENDS+=   libpcap:/usr/lib/libpcap.a

USE_REINPLACE=  yes
USE_RC_SUBR=    yes
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}

DOCS=           AUTHORS COPYING LICENSE.QPL README docs/BUGS docs/ChangeLog 
\
                docs/FAQ docs/INSTALL docs/NEWS docs/USAGE

.include <bsd.port.pre.mk>

post-patch:
        @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
                ${FILESDIR}/sancp.sh > ${WRKDIR}/sancp.sh

post-install:
        ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/sancp.sh 
${PREFIX}/etc/rc.d/sancp.sh
.for f in sancp.conf
        ${INSTALL_DATA} ${WRKSRC}/etc/sancp/${f} ${PREFIX}/etc/${f}-sample
        [ -f ${PREFIX}/etc/${f} ] || \
        ${INSTALL_DATA} ${WRKSRC}/etc/sancp/${f} ${PREFIX}/etc/${f}
.endfor
.if !defined(NOPORTDOCS)
        @${MKDIR} ${DOCSDIR}
        cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
        @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>

And this is the sancp distro Makefile:


# !!! Uncomment this CFLAGS for a small binary !!!
CFLAGS  =  -O3 -s -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2

# !!! or uncomment this CFLAGS for a large binary with symbols; use for 
debugging  !!!
#CFLAGS =  -O0 -g -I/usr/include/pcap -L/usr/lib/libpcap.so.0.6.2

final : sancp.cc Makefile
        if [ ! -f build_acl.o -o build_acl.cc -nt build_acl.o ]; then g++ 
-Wall $(CFLAGS) -c build_acl.cc -o build_ac
l.o; fi
        if [ ! -f misc_functs.o -o misc_functs.cc -nt misc_functs.o ]; then 
g++ -Wall $(CFLAGS) -c misc_functs.cc -o
misc_functs.o; fi
        if [ ! -f outputFileHandle.o -o outputFileHandle.cc -nt 
outputFileHandle.o ]; then g++ -Wall $(CFLAGS) -c out
putFileHandle.cc -o outputFileHandle.o; fi
        if [ ! -f apply_rule.o -o apply_rule.cc -nt apply_rule.o ]; then 
g++ -Wall $(CFLAGS) -c apply_rule.cc -o appl
y_rule.o; fi
        if [ ! -f decode.o -o decode.cc -nt decode.o ]; then g++ -Wall 
$(CFLAGS) -c decode.cc -o decode.o; fi
        if [ ! -f fileHandle.o -o fileHandle.cc -nt fileHandle.o ]; then 
g++ -Wall $(CFLAGS) -c fileHandle.cc -o file
Handle.o; fi
        if [ ! -f MemoryPool.o -o MemoryPool.cc -nt MemoryPool.o ]; then 
g++ -Wall $(CFLAGS) -c MemoryPool.cc -o Memo
ryPool.o; fi
        if [ ! -f pcapFileHandle.o -o pcapFileHandle.cc -nt 
pcapFileHandle.o ]; then g++ -Wall $(CFLAGS) -c pcapFileH
andle.cc -o pcapFileHandle.o; fi
        if [ ! -f sancp.o -o sancp.cc -nt sancp.o ]; then       g++ -Wall 
$(CFLAGS) -c sancp.cc -o sancp.o; fi
        if [ ! -f pcap_functions.o -o pcap_functions.c -nt pcap_functions.o 
]; then     gcc -Wall $(CFLAGS) -c pcap_f
unctions.c -o pcap_functions.o; fi
        if [ ! -f help.o -o help.cc -nt help.o ]; then  g++ -Wall $(CFLAGS) 
-c help.cc -o help.o ; fi
        if [ ! -f permissions.o -o permissions.cc -nt permissions.o ]; then 
g++ -Wall $(CFLAGS) -c permissions.cc
 -o permissions.o ; fi
        if [ ! -f check_packet.o -o check_packet.cc -nt check_packet.o ]; 
then  g++ -Wall $(CFLAGS) -c check_packet.c
c -o check_packet.o; fi
        if [ ! -f statefull_logging.o -o statefull_logging.cc -nt 
statefull_logging.o ]; then   g++ -Wall $(CFLAGS) -
c statefull_logging.cc -o statefull_logging.o ; fi
        g++ -Wall $(CFLAGS) -o sancp sancp.o misc_functs.o check_packet.o 
statefull_logging.o build_acl.o apply_rule.
o decode.o pcap_functions.o pcapFileHandle.o fileHandle.o MemoryPool.o 
help.o permissions.o outputFileHandle.o -lpcap

clean :
        rm -f *.o sancp

As you can see, the only targets are final and clean.  I've rummaged around 
through the /usr/ports/Mk/ files, but I'm not sure what to look for.

Can anyone give me a clue what to do?

Paul Schmehl (pauls at utdallas.edu)
Adjunct Information Security Officer
The University of Texas at Dallas
AVIEN Founding Member
http://www.utdallas.edu


More information about the freebsd-ports mailing list