]> git.proxmox.com Git - mirror_frr.git/blob - Makefile.am
build: add warning when overwriting vars on "make"
[mirror_frr.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 AUTOMAKE_OPTIONS = subdir-objects 1.12
4 include common.am
5
6 AM_CPPFLAGS += -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/lib \
7 -I$(top_builddir) -I$(top_builddir)/include -I$(top_builddir)/lib
8 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
9 LIBCAP = @LIBCAP@
10
11 # overwriting these vars breaks cross-compilation. let's be helpful and warn.
12 #
13 # note: "#AUTODERP# " will be removed from Makefile by configure. These are
14 # GNU make directives & automake will f*ck them up by trying to process them
15 # as automake directives.
16 #
17 #AUTODERP# null=
18 #AUTODERP# SPACE=$(null) $(null)
19 #AUTODERP# mkcheck_CC = $(findstring $(SPACE)CC=, $(SPACE)$(MAKEOVERRIDES))
20 #AUTODERP# mkcheck_CFLAGS = $(findstring $(SPACE)CFLAGS=, $(SPACE)$(MAKEOVERRIDES))
21 #AUTODERP# mkcheck_CPPFLAGS = $(findstring $(SPACE)CPPFLAGS=,$(SPACE)$(MAKEOVERRIDES))
22 #AUTODERP# mkcheck_CCLD = $(findstring $(SPACE)CCLD=, $(SPACE)$(MAKEOVERRIDES))
23 #AUTODERP# mkcheck_LD = $(findstring $(SPACE)LD=, $(SPACE)$(MAKEOVERRIDES))
24 #AUTODERP# mkcheck_LDFLAGS = $(findstring $(SPACE)LDFLAGS=, $(SPACE)$(MAKEOVERRIDES))
25 #AUTODERP# #
26 #AUTODERP# ifneq ($(mkcheck_CC),)
27 #AUTODERP# $(warning WARNING: you have overwritten the "CC" variable on the make command line.)
28 #AUTODERP# endif
29 #AUTODERP# ifneq ($(mkcheck_CFLAGS),)
30 #AUTODERP# $(warning WARNING: you have overwritten the "CFLAGS" variable on the make command line.)
31 #AUTODERP# endif
32 #AUTODERP# ifneq ($(mkcheck_CPPFLAGS),)
33 #AUTODERP# $(warning WARNING: you have overwritten the "CPPFLAGS" variable on the make command line.)
34 #AUTODERP# endif
35 #AUTODERP# ifneq ($(mkcheck_CCLD),)
36 #AUTODERP# $(warning WARNING: you have overwritten the "CCLD" variable on the make command line.)
37 #AUTODERP# endif
38 #AUTODERP# ifneq ($(mkcheck_LD),)
39 #AUTODERP# $(warning WARNING: you have overwritten the "LD" variable on the make command line.)
40 #AUTODERP# endif
41 #AUTODERP# ifneq ($(mkcheck_LDFLAGS),)
42 #AUTODERP# $(warning WARNING: you have overwritten the "LDFLAGS" variable on the make command line.)
43 #AUTODERP# endif
44 #AUTODERP# #
45 #AUTODERP# ifneq ($(mkcheck_CC)$(mkcheck_CFLAGS)$(mkcheck_CPPFLAGS)$(mkcheck_CCLD)$(mkcheck_LD)$(mkcheck_LDFLAGS),)
46 #AUTODERP# $(warning ------)
47 #AUTODERP# $(warning While overwriting these variables works most of the time, it is not recommended and can cause confusing build errors.)
48 #AUTODERP# $(warning This is especially problematic when cross-compiling, since tools that run on the build system during the build process will not be compiled correctly.)
49 #AUTODERP# $(warning All of these variables should be supplied to 'configure', and they will be remembered and correctly applied during 'make'.)
50 #AUTODERP# $(warning ------)
51 #AUTODERP# endif
52
53 EXTRA_DIST =
54 BUILT_SOURCES =
55 CLEANFILES =
56
57 examplesdir = $(exampledir)
58
59 bin_PROGRAMS =
60 sbin_PROGRAMS =
61 sbin_SCRIPTS =
62 noinst_PROGRAMS =
63 noinst_HEADERS =
64 noinst_LIBRARIES =
65 nodist_noinst_DATA =
66 lib_LTLIBRARIES =
67 module_LTLIBRARIES =
68 pkginclude_HEADERS =
69 nodist_pkginclude_HEADERS =
70 dist_examples_DATA =
71 man_MANS =
72
73 ## libtool, the self-made GNU scourge
74 ## ... this should fix relinking
75 ## ... and AUTOMAKE_DUMMY is needed to prevent automake from treating this
76 ## as overriding the normal targets...
77 $(AUTOMAKE_DUMMY)install-moduleLTLIBRARIES: install-libLTLIBRARIES
78 $(AUTOMAKE_DUMMY)install-binPROGRAMS: install-libLTLIBRARIES
79 $(AUTOMAKE_DUMMY)install-sbinPROGRAMS: install-libLTLIBRARIES
80
81 include doc/subdir.am
82 include doc/user/subdir.am
83 include doc/manpages/subdir.am
84 include doc/developer/subdir.am
85 include include/subdir.am
86 include lib/subdir.am
87 include zebra/subdir.am
88 include watchfrr/subdir.am
89 include qpb/subdir.am
90 include fpm/subdir.am
91 include tools/subdir.am
92 include debianpkg/subdir.am
93 include solaris/subdir.am
94
95 include ripd/subdir.am
96 include ripngd/subdir.am
97 include ospfd/subdir.am
98 include ospf6d/subdir.am
99 include ospfclient/subdir.am
100 include isisd/subdir.am
101 include nhrpd/subdir.am
102 include ldpd/subdir.am
103 include babeld/subdir.am
104 include eigrpd/subdir.am
105 include sharpd/subdir.am
106 include pimd/subdir.am
107 include pbrd/subdir.am
108 include staticd/subdir.am
109 include bfdd/subdir.am
110
111 SUBDIRS = . @LIBRFP@ @RFPTEST@ \
112 @BGPD@ \
113 @VTYSH@ \
114 tests
115
116 DIST_SUBDIRS = . bgpd \
117 vtysh tests \
118 bgpd/rfp-example/librfp \
119 bgpd/rfp-example/rfptest \
120 # end
121
122 if PKGSRC
123 rcdir=@pkgsrcrcdir@
124 rc_SCRIPTS = \
125 pkgsrc/bgpd.sh \
126 pkgsrc/ospf6d.sh \
127 pkgsrc/ospfd.sh \
128 pkgsrc/ripd.sh \
129 pkgsrc/ripngd.sh \
130 pkgsrc/zebra.sh \
131 # end
132 endif
133
134 EXTRA_DIST += \
135 aclocal.m4 \
136 m4/README.txt \
137 \
138 python/clidef.py \
139 python/clippy/__init__.py \
140 \
141 redhat/frr.init \
142 redhat/frr.service \
143 redhat/daemons \
144 redhat/frr.logrotate \
145 redhat/frr.pam \
146 redhat/frr.spec \
147 redhat/README.rpm_build.md \
148 \
149 snapcraft/snapcraft.yaml \
150 snapcraft/README.snap_build.md \
151 snapcraft/README.usage.md \
152 snapcraft/extra_version_info.txt \
153 snapcraft/scripts \
154 snapcraft/defaults \
155 snapcraft/helpers \
156 snapcraft/snap \
157 \
158 vtysh/Makefile.am \
159 vtysh/Makefile.in \
160 \
161 doc/Makefile \
162 doc/developer/Makefile \
163 doc/manpages/Makefile \
164 doc/user/Makefile \
165 # end
166
167 ACLOCAL_AMFLAGS = -I m4
168
169 noinst_HEADERS += defaults.h
170
171 indent:
172 tools/indent.py `find sharpd bgpd eigrpd include isisd lib nhrpd ospf6d ospfd pimd qpb ripd vtysh zebra -name '*.[ch]' | grep -v include/linux`
173
174 if HAVE_GCOV
175
176 coverage: check
177 @ find . -name '*.o' -exec gcov {} \;
178
179 yorn:
180 @ echo "OK to upload coverage to https://coverage.io [y/N]:"
181 @ read yn; test "$$yn" = "y"
182
183 upload-check-coverage:
184 @ if [ "x${COMMIT}" = "x" ]; then echo "COMMIT required"; exit 1; fi
185 @ if [ "x${TOKEN}" = "x" ]; then echo "TOKEN required"; exit 1; fi
186 curl -s https://codecov.io/bash | bash -s - -C ${COMMIT} -t ${TOKEN}
187
188 force-check-coverage: coverage upload-check-coverage
189
190 check-coverage: coverage yorn upload-check-coverage
191
192 endif