1 # top-level Makefile for NUT
3 # include directory for aclocal
4 ACLOCAL_AMFLAGS = -I m4
6 # subdirectories to build and distribute. The order matters, as
7 # several subdirectories depend on stuff in "common" or tools being built first
8 SUBDIRS = include common clients conf data tools docs drivers \
9 lib scripts server tests
11 # COPYING is included automatically.
12 EXTRA_DIST = LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING
14 # ----------------------------------------------------------------------
15 # flags to pass to ./configure when calling "make distcheck" and "make
16 # distcheck-light". Try to check as many features as possible! Also
17 # need to give hotplug-dir and udev-dir, so that staged install does
20 DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
21 DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
23 DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
24 --with-hotplug-dir='$${prefix}/etc/hotplug' \
25 --with-udev-dir='$${prefix}/etc/udev'
28 $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
30 # workaround the dist generated files that are also part of the distribution
31 # Note that distcleancheck is disabled for now, while waiting for a proper
32 # solution, that do not break older unix systems
33 #distcleancheck_listfiles = \
34 # find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
38 # Automatically generate the ChangeLog from Git logs:
39 MAINTAINERCLEAN_FILES = ChangeLog
40 # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
41 # in case it has already been generated previously
43 ChangeLog: tools/gitlog2changelog.py dummy-stamp
44 tools/gitlog2changelog.py v2.6.0 || \
45 echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@
49 cd docs; $(MAKE) $(AM_MAKEFLAGS) website
50 cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man
51 cd tools; $(MAKE) $(AM_MAKEFLAGS) website
52 cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website
55 @echo "Not building website since 'asciidoc' was not found."
58 # ----------------------------------------------------------------------
59 # targets from old build system (pre-automake).
60 # supported for a period of time for backward "compatibility".
62 WARN="----------------------------------------------------------------------"
66 @echo "Warning: 'make build' is deprecated. Use 'make all' instead."
68 $(MAKE) $(AM_MAKEFLAGS) all
71 @echo "Warning: 'make install-bin' is deprecated."
72 @echo "Use 'make install-exec' instead for a similar effect."
74 cd common; $(MAKE) $(AM_MAKEFLAGS) install
75 cd drivers; $(MAKE) $(AM_MAKEFLAGS) install
76 cd server; $(MAKE) $(AM_MAKEFLAGS) install
77 cd clients; $(MAKE) $(AM_MAKEFLAGS) install
78 install-man: install-data-recursive
80 @echo "Warning: 'make install-man' is deprecated."
81 @echo "Use 'cd man; make install' instead."
83 cd man; $(MAKE) $(AM_MAKEFLAGS) install
86 @echo "Warning: 'make install-conf' is deprecated."
87 @echo "Use 'cd conf; make install' instead."
89 cd conf; $(MAKE) $(AM_MAKEFLAGS) install
90 # The target install-data already has a standardized meaning under automake
93 @echo "Warning: 'make install-dirs' is deprecated."
94 @echo "Use 'make installdirs' instead."
97 cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \
98 install-cgi-man install-cgi-conf install-cgi-html:
99 @echo "Error: 'make $@' no longer exists."
100 @echo "Use './configure --with-cgi' instead."
102 @echo "Error: 'make $@' no longer exists."
103 @echo "Use './configure --with-lib' instead."
104 usb build-usb install-usb:
105 @echo "Error: 'make $@' no longer exists."
106 @echo "Use './configure --with-usb' instead."
107 snmp build-snmp install-snmp install-snmp-mgr install-snmp-man:
108 @echo "Error: 'make $@' no longer exists."
109 @echo "Use './configure --with-snmp' instead."
111 @echo "Error: 'make setver' no longer exists."
112 @echo "Edit configure.in to set version number."
114 if test `uname -s` = "HP-UX"; then \
117 mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
119 if test `uname -s` = "SunOS"; then \
123 cd scripts/Solaris; \