Skip to content

Commit 1f9ed56

Browse files
authored
Merge pull request #2284 from jimklimov/issue-2275-cleanup
Some generic codebase/recipe clean-up per recent investigation
2 parents 4c6459b + d170642 commit 1f9ed56

20 files changed

+34
-28
lines changed

Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# top-level Makefile for NUT
22

3-
# include directory for aclocal
4-
ACLOCAL_AMFLAGS = -I m4
5-
63
# Export certain values for ccache which NUT ci_build.sh can customize,
74
# to facilitate developer iteration re-runs of "make" later.
85
# At least GNU and BSD make implementations are okay with this syntax.
@@ -12,6 +9,9 @@ ACLOCAL_AMFLAGS = -I m4
129
@NUT_AM_MAKE_CAN_EXPORT@export CCACHE_PATH=@CCACHE_PATH@
1310
@NUT_AM_MAKE_CAN_EXPORT@export PATH=@PATH_DURING_CONFIGURE@
1411

12+
# include directory for aclocal
13+
ACLOCAL_AMFLAGS = -I m4
14+
1515
# subdirectories to build and distribute. The order matters, as
1616
# several subdirectories depend on stuff in "common" or tools being built first
1717
SUBDIRS = include common clients conf data docs drivers tools \

clients/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Network UPS Tools: clients
2-
EXTRA_DIST =
32

43
# Export certain values for ccache which NUT ci_build.sh can customize,
54
# to facilitate developer iteration re-runs of "make" later.
@@ -10,6 +9,8 @@ EXTRA_DIST =
109
@NUT_AM_MAKE_CAN_EXPORT@export CCACHE_PATH=@CCACHE_PATH@
1110
@NUT_AM_MAKE_CAN_EXPORT@export PATH=@PATH_DURING_CONFIGURE@
1211

12+
EXTRA_DIST =
13+
1314
# nutclient.cpp for some legacy reason (maybe initial detached development?)
1415
# optionally includes "common.h" with the NUT build setup - and this option
1516
# was never triggered in fact, not until pushed through command line like this:

common/Makefile.am

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Network UPS Tools: common
22

3-
AM_CFLAGS = -I$(top_srcdir)/include
4-
AM_LDFLAGS = -no-undefined
5-
EXTRA_DIST =
6-
7-
noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la
8-
libparseconf_la_SOURCES = parseconf.c
9-
103
# Export certain values for ccache which NUT ci_build.sh can customize,
114
# to facilitate developer iteration re-runs of "make" later.
125
# At least GNU and BSD make implementations are okay with this syntax.
@@ -16,6 +9,13 @@ libparseconf_la_SOURCES = parseconf.c
169
@NUT_AM_MAKE_CAN_EXPORT@export CCACHE_PATH=@CCACHE_PATH@
1710
@NUT_AM_MAKE_CAN_EXPORT@export PATH=@PATH_DURING_CONFIGURE@
1811

12+
AM_CFLAGS = -I$(top_srcdir)/include
13+
AM_LDFLAGS = -no-undefined
14+
EXTRA_DIST =
15+
16+
noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la
17+
libparseconf_la_SOURCES = parseconf.c
18+
1919
# do not hard depend on '../include/nut_version.h', since it blocks
2020
# 'dist', and is only required for actual build, in which case
2121
# BUILT_SOURCES (in ../include) will ensure nut_version.h will

data/html/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Network UPS Tools: data/html
2+
23
# install these only if configured --with-cgi
34
if WITH_CGI
45
dist_html_DATA = index.html bottom.html nut-banner.png

drivers/apc-ats-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "apc-ats-mib.h"
2626

27-
#define APC_ATS_MIB_VERSION "0.6"
27+
#define APC_ATS_MIB_VERSION "0.60"
2828

2929
#define APC_ATS_SYSOID ".1.3.6.1.4.1.318.1.3.11"
3030
#define APC_ATS_OID_MODEL_NAME ".1.3.6.1.4.1.318.1.1.8.1.5.0"

drivers/apc-epdu-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "apc-epdu-mib.h"
2525

26-
#define APC_EPDU_MIB_VERSION "0.1"
26+
#define APC_EPDU_MIB_VERSION "0.10"
2727

2828
#define APC_EPDU_MIB_SYSOID ".1.3.6.1.4.1.318.1.3.4.9"
2929

drivers/apc-pdu-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "apc-pdu-mib.h"
2525

26-
#define APC_PDU_MIB_VERSION "0.4"
26+
#define APC_PDU_MIB_VERSION "0.40"
2727

2828
#define APC_PDU_MIB_SYSOID_RPDU ".1.3.6.1.4.1.318.1.3.4.4"
2929
#define APC_PDU_MIB_SYSOID_RPDU2 ".1.3.6.1.4.1.318.1.3.4.5"

drivers/bestpower-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include "bestpower-mib.h"
2424

25-
#define BESTPOWER_MIB_VERSION "0.4"
25+
#define BESTPOWER_MIB_VERSION "0.40"
2626
#define BESTPOWER_OID_MODEL_NAME ".1.3.6.1.4.1.2947.1.1.2.0"
2727

2828
/*

drivers/delta_ups-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include "delta_ups-mib.h"
2727

28-
#define DELTA_UPS_MIB_VERSION "0.5"
28+
#define DELTA_UPS_MIB_VERSION "0.50"
2929

3030
#define DELTA_UPS_SYSOID ".1.3.6.1.4.1.2254.2.4"
3131

drivers/eaton-pdu-nlogic-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "eaton-pdu-nlogic-mib.h"
2626

27-
#define EATON_PDU_NLOGIC_MIB_VERSION "0.1"
27+
#define EATON_PDU_NLOGIC_MIB_VERSION "0.10"
2828

2929
#define EATON_PDU_NLOGIC_SYSOID ".1.3.6.1.4.1.534.7.1"
3030

drivers/eaton-pdu-pulizzi-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
/* Pulizzi Switched ePDU */
4444

45-
#define EATON_PULIZZI_SW_MIB_VERSION "0.5"
45+
#define EATON_PULIZZI_SW_MIB_VERSION "0.50"
4646

4747
#define PULIZZI_SW_OID_MIB ".1.3.6.1.4.1.20677.3.1.1"
4848
#define PULIZZI_SW_OID_MODEL_NAME ".1.3.6.1.4.1.20677.2.1.1.0"

drivers/emerson-avocent-pdu-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include "emerson-avocent-pdu-mib.h"
2727

28-
#define EMERSON_AVOCENT_MIB_VERSION "1.3"
28+
#define EMERSON_AVOCENT_MIB_VERSION "1.30"
2929
#define EMERSON_AVOCENT_SYSOID ".1.3.6.1.4.1.10418.17.1.7"
3030
#define EMERSON_AVOCENT_OID_MODEL_NAME ".1.3.6.1.4.1.10418.17.2.1.2.0"
3131

drivers/hpe-pdu3-cis-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "hpe-pdu3-cis-mib.h"
2323

24-
#define HPE_PDU3_CIS_MIB_VERSION "0.1"
24+
#define HPE_PDU3_CIS_MIB_VERSION "0.10"
2525

2626
#define HPE_PDU3_CIS_SYSOID ".1.3.6.1.4.1.232.165.11"
2727
#define HPE_PDU3_OID_MODEL_NAME ".1.3.6.1.4.1.232.165.11.1.2.1.3.1"

drivers/huawei-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "huawei-mib.h"
2323

24-
#define HUAWEI_MIB_VERSION "0.4"
24+
#define HUAWEI_MIB_VERSION "0.40"
2525

2626
#define HUAWEI_SYSOID ".1.3.6.1.4.1.8072.3.2.10"
2727
#define HUAWEI_UPSMIB ".1.3.6.1.4.1.2011"

drivers/raritan-pdu-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include "raritan-pdu-mib.h"
2727

28-
#define RARITAN_MIB_VERSION "0.8"
28+
#define RARITAN_MIB_VERSION "0.80"
2929

3030
/* Raritan MIB
3131
* this one uses the same MIB as Eaton Revelation,

drivers/raritan-px2-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "raritan-px2-mib.h"
2525

26-
#define RARITAN_PX2_MIB_VERSION "0.4"
26+
#define RARITAN_PX2_MIB_VERSION "0.40"
2727

2828
#define RARITAN_PX2_MIB_SYSOID ".1.3.6.1.4.1.13742.6"
2929
#define RARITAN_PX2_OID_MODEL_NAME ".1.3.6.1.4.1.13742.6.3.2.1.1.3.1"

drivers/xppc-mib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "xppc-mib.h"
2626

27-
#define XPPC_MIB_VERSION "0.4"
27+
#define XPPC_MIB_VERSION "0.40"
2828

2929
#define XPPC_SYSOID ".1.3.6.1.4.1.935"
3030

scripts/python/module/Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GENERATED_DIST = dist build *.egg-info
2525
GENERATED_SRC = PyNUTClient README.txt LICENSE-GPL3
2626

2727
# These are normally generated by a NUT build, but if we want to iterate
28-
# specifically PyNUTClient packaging - `make clean dist` should do it here:
28+
# specifically PyNUTClient packaging - `make veryclean dist` should do it here:
2929
GENERATED_PY = test_nutclient.py PyNUT.py setup.py
3030

3131
# (Re-)generate files normally made by `configure` from .in templates
@@ -40,13 +40,16 @@ $(GENERATED_DIST): .pypi-dist
4040
clean-local:
4141
rm -rf $(GENERATED_SRC) $(GENERATED_DIST)
4242
rm -f .pypi-src .pypi-dist*
43+
44+
veryclean: clean
4345
rm -f $(GENERATED_PY)
4446

4547
# Python test envs take a while to populate, so maybe better not clean
4648
# them too enthusiastically. Can revise (move to "clean-local") later,
4749
# if this choice proves a problem.
4850
distclean-local:
4951
rm -rf .tox
52+
rm -f $(GENERATED_PY)
5053

5154
MAINTAINERCLEANFILES = Makefile.in .dirstamp .pypi-tools*
5255

scripts/subdriver/gen-snmp-subdriver.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Copyright (C)
1111
# 2011 - 2012 Arnaud Quette <arnaud.quette@free.fr>
1212
# 2015 - 2022 Eaton (author: Arnaud Quette <ArnaudQuette@Eaton.com>)
13-
# 2011 - 2022 Jim Klimov <jimklimov+nut@gmail.com>
13+
# 2011 - 2024 Jim Klimov <jimklimov+nut@gmail.com>
1414
#
1515
# This program is free software; you can redistribute it and/or modify
1616
# it under the terms of the GNU General Public License as published by
@@ -206,7 +206,7 @@ generate_C() {
206206
207207
#include "${HFILE}"
208208
209-
#define ${UDRIVER}_MIB_VERSION "0.1"
209+
#define ${UDRIVER}_MIB_VERSION "0.01"
210210
211211
#define ${UDRIVER}_SYSOID "${DEVICE_SYSOID}"
212212

tools/nut-usbinfo.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ sub find_usbdevs
361361
$driver=$1;
362362
}
363363
else {
364-
die "Unknown driver type: $nameFile";
364+
warn "Unknown driver type: $nameFile";
365+
next;
365366
}
366367
if ($vendor{$VendorID}{$ProductID}{"driver"}) {
367368
if ($driver ne $vendor{$VendorID}{$ProductID}{"driver"}) {

0 commit comments

Comments
 (0)