From owner-svn-src-all@FreeBSD.ORG Fri Aug 29 18:26:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2C46A6F; Fri, 29 Aug 2014 18:26:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD26A1316; Fri, 29 Aug 2014 18:26:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7TIQuVq099440; Fri, 29 Aug 2014 18:26:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7TIQu7W099436; Fri, 29 Aug 2014 18:26:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408291826.s7TIQu7W099436@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 29 Aug 2014 18:26:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270824 - in stable/10: . sbin/atm/atmconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2014 18:26:56 -0000 Author: ngie Date: Fri Aug 29 18:26:55 2014 New Revision: 270824 URL: http://svnweb.freebsd.org/changeset/base/270824 Log: MFC r270027: tmconfig compilation when MK_ATM == yes and MK_BSNMP == no Makefile.inc1: Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no instead of depending on a potentially stale tool installed on the build host sbin/atm/atmconfig/Makefile: - Always remove oid.h to avoid cluttering up the build/src tree. - Consolidate all of the RESCUE/MK_BSNMP != no logic under one conditional to improve readability - Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead of spelling out oid.h - Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and MK_OPENSSL == yes and not compiling for /rescue/rescue sbin/atm/atmconfig/main.c: Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it clear that we're compiling bsnmp support into atmconfig Modified: stable/10/Makefile.inc1 stable/10/sbin/atm/atmconfig/Makefile stable/10/sbin/atm/atmconfig/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Aug 29 18:18:29 2014 (r270823) +++ stable/10/Makefile.inc1 Fri Aug 29 18:26:55 2014 (r270824) @@ -1257,7 +1257,7 @@ _lex= usr.bin/lex _awk= usr.bin/awk .endif -.if ${MK_BSNMP} != "no" && !exists(/usr/sbin/gensnmptree) +.if ${MK_BSNMP} != "no" _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif Modified: stable/10/sbin/atm/atmconfig/Makefile ============================================================================== --- stable/10/sbin/atm/atmconfig/Makefile Fri Aug 29 18:18:29 2014 (r270823) +++ stable/10/sbin/atm/atmconfig/Makefile Fri Aug 29 18:26:55 2014 (r270824) @@ -8,29 +8,24 @@ .include PROG= atmconfig -.ifndef RESCUE -SRCS= ${.OBJDIR}/oid.h -.endif -SRCS+= main.c diag.c natm.c -.ifndef RESCUE -SRCS+= atmconfig_device.c -.endif +SRCS= main.c diag.c natm.c MAN= atmconfig.8 # CFLAGS+= -DPATH_HELP='".:/usr/share/doc/atm:/usr/local/share/doc/atm"' CFLAGS+= -I${.OBJDIR} -.ifndef RESCUE -DPADD= ${LIBBSNMP} -LDADD= -lbsnmp +.if !defined(RESCUE) && ${MK_BSNMP} != "no" +CFLAGS+= -DWITH_BSNMP +SRCS+= oid.h atmconfig_device.c +DPADD+= ${LIBBSNMP} +LDADD+= -lbsnmp . if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no" +DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto . endif .endif -.ifndef RESCUE CLEANFILES+= oid.h -.endif # XXX - this is verboten .if ${MACHINE_CPUARCH} == "arm" @@ -43,8 +38,8 @@ FILESDIR= /usr/share/doc/atm SNMP_ATM_DEF= ${.CURDIR}/../../../contrib/ngatm/snmp_atm/atm_tree.def \ ${.CURDIR}/../../../usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def -${.OBJDIR}/oid.h: atm_oid.list ${SNMP_ATM_DEF} +oid.h: atm_oid.list ${SNMP_ATM_DEF} cat ${SNMP_ATM_DEF} | gensnmptree -e `tail -n +2 ${.CURDIR}/atm_oid.list` \ - > ${.OBJDIR}/oid.h + > ${.TARGET} .include Modified: stable/10/sbin/atm/atmconfig/main.c ============================================================================== --- stable/10/sbin/atm/atmconfig/main.c Fri Aug 29 18:18:29 2014 (r270823) +++ stable/10/sbin/atm/atmconfig/main.c Fri Aug 29 18:26:55 2014 (r270824) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifndef RESCUE +#ifdef WITH_BSNMP #include #include #include @@ -444,7 +444,7 @@ help_func(int argc, char *argv[]) exit(1); } -#ifndef RESCUE +#ifdef WITH_BSNMP /* * Parse a server specification * @@ -527,16 +527,16 @@ main(int argc, char *argv[]) int opt, i; const struct cmdtab *match, *cc, *tab; -#ifndef RESCUE +#ifdef WITH_BSNMP snmp_client_init(&snmp_client); snmp_client.trans = SNMP_TRANS_LOC_STREAM; snmp_client_set_host(&snmp_client, PATH_ILMI_SOCK); #endif -#ifdef RESCUE -#define OPTSTR "htv" -#else +#ifdef WITH_BSNMP #define OPTSTR "htvs:" +#else +#define OPTSTR "htv" #endif while ((opt = getopt(argc, argv, OPTSTR)) != -1) @@ -545,7 +545,7 @@ main(int argc, char *argv[]) case 'h': help_func(0, argv); -#ifndef RESCUE +#ifdef WITH_BSNMP case 's': parse_server(optarg); break; @@ -570,7 +570,7 @@ main(int argc, char *argv[]) err(1, NULL); memcpy(main_tab, static_main_tab, sizeof(static_main_tab)); -#ifndef RESCUE +#ifdef WITH_BSNMP /* XXX while this is compiled in */ device_register(); #endif