dnscrypto-proxy: Update to release 1.3.0
[tomato.git] / release / src / router / snmp / Makefile.in
blobacff957392eaa4cfe4caf4e6eb215a343c6e6386
2 # Makefile.in (at the root of net-snmp)
5 top_builddir = .
7 SUBDIRS = snmplib agent apps local man mibs
8 TESTDIRS = testing
10 CPP = @CPP@ \
11 -Iinclude -I$(srcdir)/include -I$(srcdir)/agent/mibgroup -I. -I$(srcdir) \
12 -DDONT_INC_STRUCTS -DBINDIR=$(bindir) \
13 $(EXTRACPPFLAGS)
15 INSTALLHEADERS=version.h
16 INCLUDESUBDIR=system
17 INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h darwin.h \
18 dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \
19 irix.h linux.h mips.h netbsd.h openbsd.h solaris2.6.h solaris2.7.h \
20 solaris2.8.h solaris2.9.h solaris.h sunos.h svr5.h sysv.h ultrix4.h
21 INCLUDESUBDIR2=machine
22 INCLUDESUBDIRHEADERS2=generic.h
23 INSTALLBUILTHEADERS=include/net-snmp/net-snmp-config.h
24 INSTALLBINSCRIPTS=net-snmp-config
25 INSTALLUCDHEADERS=ucd-snmp-config.h version.h mib_module_config.h
28 # other install rules.
30 OTHERINSTALL=copypersistentfiles @PERLINSTALLTARGS@
31 COPY_PERSISTENT_FILES=@COPY_PERSISTENT_FILES@
32 PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@
33 UCDPERSISTENT_DIRECTORY=@UCDPERSISTENT_DIRECTORY@
36 # perl specific
38 # yes, order matters here. default_store must occur before anything else
39 PERLMODULES=default_store SNMP ASN OID agent
40 PERLARGS=@PERLARGS@
43 # targets
45 all: sedscript EXAMPLE.conf standardall @PERLTARGS@
47 start-flag:
48 @touch build-in-progress-flag
50 end-flag:
51 @rm -f build-in-progress-flag > /dev/null 2>&1
54 # local build rules
56 sedscript: sedscript.in include/net-snmp/net-snmp-config.h $(srcdir)/agent/mibgroup/mibdefs.h
57 $(CPP) $(srcdir)/sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript
58 echo 's#DATADIR#$(datadir)#g' >> sedscript
59 echo 's#LIBDIR#$(libdir)#g' >> sedscript
60 echo 's#BINDIR#$(bindir)#g' >> sedscript
61 echo 's#PERSISTENT_DIRECTORY#$(PERSISTENT_DIRECTORY)#g' >> sedscript
62 echo 's#SYSCONFDIR#$(sysconfdir)#g' >> sedscript
64 EXAMPLE.conf: sedscript EXAMPLE.conf.def
65 $(SED) -f sedscript $(srcdir)/EXAMPLE.conf.def > EXAMPLE.conf
67 docs: docsdir mancp
69 docsdir: docsdox docsmunge
71 docsdox: doxygen.conf
72 srcdir=$(srcdir) doxygen $(srcdir)/doxygen.conf
74 docsmunge:
75 find docs/html -name \*.html -exec perl -p -i -e 's/Generated on/<!--#include virtual=\"\/sfbutton.html\" --><br>Generated on\n/; s/<body/<body bgcolor=white/' {} \;
78 mancp:
79 @for i in docs/man/man3/* ; do \
80 cp $$i man/netsnmp_`basename $$i` ; \
81 done
84 # extra install rules
87 copypersistentfiles:
88 @if test "$(COPY_PERSISTENT_FILES)" = "yes" -a -d $(UCDPERSISTENT_DIRECTORY) -a ! -d $(PERSISTENT_DIRECTORY) ; then \
89 cp -pr $(UCDPERSISTENT_DIRECTORY) $(PERSISTENT_DIRECTORY) ; \
90 echo "copying $(UCDPERSISTENT_DIRECTORY) to $(PERSISTENT_DIRECTORY)" ; \
93 # test targets
95 test: all testdirs
96 ( cd testing; $(MAKE) test )
98 testdirs:
99 for i in $(TESTDIRS) ; do \
100 ( cd $$i ; $(MAKE) ) ; \
101 if test $$? != 0 ; then \
102 exit 1 ; \
103 fi \
104 done
106 distall: ${srcdir}/configure ${srcdir}/include/net-snmp/net-snmp-config.h
108 OTHERCLEANTARGETS=EXAMPLE.conf sedscript
109 OTHERCLEANTODOS=perlclean
112 # perl specific build rules
114 perlmodules: perlmakefiles
115 @(cd perl ; $(MAKE)) ; \
116 if test $$? != 0 ; then \
117 exit 1 ; \
120 perlmakefiles:
121 @if test ! -f perl/Makefile; then \
122 (dir=`pwd`; \
123 cd perl ; \
124 perl Makefile.PL -NET-SNMP-IN-SOURCE=true -NET-SNMP-CONFIG="sh $$dir/net-snmp-config") $(PERLARGS) ; \
127 perlinstall:
128 @(cd perl ; $(MAKE) install) ; \
129 if test $$? != 0 ; then \
130 exit 1 ; \
133 perltest:
134 @(cd perl ; $(MAKE) test) ; \
135 if test $$? != 0 ; then \
136 exit 1 ; \
139 perlclean:
140 @if test -f perl/Makefile; then \
141 ( cd perl ; $(MAKE) clean ) ; \
145 # make distclean completely removes all traces of building including
146 # any files generated by configure itself.
148 distclean: clean configclean tarclean
150 makefileclean:
151 rm -f Makefile snmplib/Makefile \
152 agent/Makefile agent/mibgroup/Makefile \
153 agent/helpers/Makefile \
154 apps/Makefile apps/snmpnetstat/Makefile \
155 man/Makefile mibs/Makefile ov/Makefile \
156 local/Makefile testing/Makefile
158 configclean: makefileclean
159 rm -f config.cache config.status config.log \
160 libtool include/net-snmp/net-snmp-config.h \
161 net-snmp-config configure-summary
162 rm -f mibs/.index
163 rm -f include/net-snmp/agent/mib_module_config.h \
164 snmplib/snmpsm_init.h \
165 agent/mibgroup/mib_module_includes.h \
166 agent/mibgroup/mib_module_inits.h \
167 agent/mibgroup/mib_module_shutdown.h \
168 agent/mibgroup/mib_module_dot_conf.h
169 rm -f *.core
172 # Configure script related targets
174 touchit:
175 touch configure include/net-snmp/net-snmp-config.h.in
176 touch config.status
177 touch stamp-h stamp-h.in
179 Makefile: Makefile.in config.status Makefile.rules Makefile.top
180 @if test "x$(NOAUTODEPS)" = "x"; then \
181 ./config.status; \
182 else \
183 echo "WARNING: not running config.status"; \
186 $(srcdir)/include/net-snmp/net-snmp-config.h.in: stamp-h.in
187 $(srcdir)/stamp-h.in: configure.in acconfig.h
188 @if test "x$(NOAUTODEPS)" = "x" -a "x$(AUTOHEADER)" != "x:"; then \
189 cd ${srcdir} && LC_COLLATE=C $(AUTOHEADER); \
190 echo timestamp > ${srcdir}/stamp-h.in; \
191 else \
192 echo "WARNING: not running autoheader"; \
195 include/net-snmp/net-snmp-config.h: stamp-h
196 stamp-h: include/net-snmp/net-snmp-config.h.in config.status
197 @if test "x$(NOAUTODEPS)" = "x"; then \
198 ./config.status; \
199 echo timestamp > stamp-h; \
200 else \
201 echo "WARNING: not running config.status"; \
204 $(srcdir)/configure: configure.in aclocal.m4
205 @if test "x$(NOAUTODEPS)" = "x" -a "x$(AUTOCONF)" != "x:"; then \
206 cd ${srcdir} && $(AUTOCONF); \
207 echo "Please run configure now."; \
208 sh -c exit 2; \
209 else \
210 echo "WARNING: not running autoconf"; \
213 config.status: configure
214 @if test "x$(NOAUTODEPS)" = "x"; then \
215 ./config.status --recheck; \
216 else \
217 echo "WARNING: not running config.status --recheck"; \
221 # Emacs TAGS file
223 TAGS:
224 find $(srcdir) -name '*.[ch]' -print | etags -
227 # Internal distribution packaging, etc.
229 version:
230 @if test "x$(VERSION)" = "x"; then \
231 echo "you need to supply a VERSION string."; \
232 exit 2; \
234 ${srcdir}/agent/mibgroup/versiontag $(VERSION) reverse
236 tag:
237 @if test "x$(VERSION)" = "x"; then \
238 echo "you need to supply a VERSION string."; \
239 exit 2; \
241 ${srcdir}/agent/mibgroup/versiontag $(VERSION) tag
243 tar:
244 @if test "x$(VERSION)" = "x"; then \
245 echo "you need to supply a VERSION string."; \
246 exit 2; \
248 ${srcdir}/agent/mibgroup/versiontag $(VERSION) tar
250 tarclean:
251 @if test -x ${srcdir}/agent/mibgroup/versiontag ; then \
252 ${srcdir}/agent/mibgroup/versiontag Ext clean ; \
255 commentcheck:
256 grep -n // `find $(srcdir)/ -name \*.\[ch\]` | egrep -v "(ftp|http|/win32/)"
258 dist: version tag tar
260 FAQ.html:
261 local/FAQ2HTML FAQ
263 .PHONY: docs docsdir mancp testdirs test TAGS
264 # note: tags and docs are phony to force rebulding