apcupsd-ups: add NEWS and man page link
[networkupstools/kirr.git] / Makefile.am
blob34b7e1fdd0e69bdbdc336ba154bf9afcdacf021c
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
18 # not fail.
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'
27 distcheck-light:
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 {}' ';'
35 distcleancheck:
36         @:
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
42 dummy-stamp:
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" > $@
47 if HAVE_ASCIIDOC
48 website:
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
53 else !HAVE_ASCIIDOC
54 website:
55         @echo "Not building website since 'asciidoc' was not found."
56 endif !HAVE_ASCIIDOC
58 # ----------------------------------------------------------------------
59 # targets from old build system (pre-automake).
60 # supported for a period of time for backward "compatibility".
62 WARN="----------------------------------------------------------------------"
64 build:
65         @echo $(WARN)
66         @echo "Warning: 'make build' is deprecated. Use 'make all' instead."
67         @echo $(WARN)
68         $(MAKE) $(AM_MAKEFLAGS) all
69 install-bin:
70         @echo $(WARN)
71         @echo "Warning: 'make install-bin' is deprecated." 
72         @echo "Use 'make install-exec' instead for a similar effect."
73         @echo $(WARN)
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
79         @echo $(WARN)
80         @echo "Warning: 'make install-man' is deprecated."
81         @echo "Use 'cd man; make install' instead."
82         @echo $(WARN)
83         cd man; $(MAKE) $(AM_MAKEFLAGS) install
84 install-conf:
85         @echo $(WARN)
86         @echo "Warning: 'make install-conf' is deprecated."
87         @echo "Use 'cd conf; make install' instead."
88         @echo $(WARN)
89         cd conf; $(MAKE) $(AM_MAKEFLAGS) install
90 # The target install-data already has a standardized meaning under automake
91 install-dirs:
92         @echo $(WARN)
93         @echo "Warning: 'make install-dirs' is deprecated."
94         @echo "Use 'make installdirs' instead."
95         @echo $(WARN)
96         make installdirs
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."
101 install-lib:
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."
110 setver:
111         @echo "Error: 'make setver' no longer exists."
112         @echo "Edit configure.in to set version number."
113 package:
114         if test `uname -s` = "HP-UX"; then \
115                 cd scripts/HP-UX; \
116                 make package; \
117                 mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
118         else \
119                 if test `uname -s` = "SunOS"; then \
120                         make; \
121                         rm -rf @prefix@; \
122                         make install; \
123                         cd scripts/Solaris; \
124                         make package; \
125                         make uninstall; \
126                         rm -rf @prefix@; \
127                 fi; \
128         fi;