File: Makefile.in

package info (click to toggle)
ucd-snmp 4.2.3-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 9,892 kB
  • ctags: 9,256
  • sloc: ansic: 91,986; sh: 8,087; perl: 6,886; makefile: 1,539
file content (163 lines) | stat: -rw-r--r-- 4,386 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#
# Makefile.in (at the root of ucd-snmp)
#

top_builddir	= .
TARG		=	bin/snmpget$(EXEEXT) bin/snmpgetnext$(EXEEXT) bin/snmpset$(EXEEXT) 	\
			bin/snmptranslate$(EXEEXT) bin/snmpwalk$(EXEEXT) bin/snmpbulkwalk$(EXEEXT) \
			bin/snmptest$(EXEEXT) bin/snmptrapd$(EXEEXT) bin/snmpnetstat$(EXEEXT) bin/snmpd$(EXEEXT)

SUBDIRS		= snmplib agent apps local ov man
INSTALLDIRS	= snmplib agent apps local man mibs
TESTDIRS	= testing

CPP		= @CPP@ 						\
			-I$(srcdir)/agent/mibgroup -I. -I$(srcdir)	\
			-DDONT_INC_STRUCTS -DBINDIR=$(bindir) 		\
			$(EXTRACPPFLAGS)


CPP = @CPP@ -I$(srcdir)/agent/mibgroup -I. -I$(srcdir) -DDONT_INC_STRUCTS -DBINDIR=$(bindir) $(EXTRACPPFLAGS)

INSTALLHEADERS=ucd-snmp-config.h $(srcdir)/version.h mib_module_config.h

all:	sedscript EXAMPLE.conf ucd-snmp-config.h subdirs

test:   all
	( cd testing; $(MAKE) test )

sedscript: sedscript.in config.h $(srcdir)/agent/mibgroup/mibdefs.h
	$(CPP) -DPREFIX=$(prefix) -DLIBDIR=$(libdir) -DDATADIR=$(datadir) -DSYSCONFDIR=$(sysconfdir) $(srcdir)/sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript


ucd-snmp-config.h: config.h
	@egrep -v "IN_UCD_SNMP_SOURCE|SYSTEM_INCLUDE|MACHINE_INCLUDE|mib_module_config" config.h > ucd-snmp-config.h

subdirs:
	for i in $(SUBDIRS) ; do	\
        ( cd $$i ; $(MAKE) ) ;		\
	done


test: all testdirs

testdirs:
	for i in $(TESTDIRS) ; do	\
        ( cd $$i ; $(MAKE) ) ;		\
	done


distall: ${srcdir}/configure ${srcdir}/config.h 


install:    all installdirs
	for i in $(INSTALLDIRS) ; do	\
        ( cd $$i ; $(MAKE) install ) ;	\
	done
	@for i in $(INSTALLHEADERS) ; do \
		$(INSTALL) $$i $(includedir) ; \
		echo "install:  installed $$i in $(includedir)";\
	done

installdirs:
	@$(SHELL) $(srcdir)/mkinstalldirs $(snmplibdir) $(mibdir) $(includedir)
	@-$(SHELL) $(srcdir)/mkinstalldirs $(persistentdir)

apps/snmpget$(EXEEXT) apps/snmpgetnext$(EXEEXT) apps/snmpset$(EXEEXT) apps/snmptranslate$(EXEEXT) apps/snmpwalk$(EXEEXT) apps/snmpbulkwalk$(EXEEXT) apps/snmptest$(EXEEXT) apps/snmptrapd$(EXEEXT) apps/snmpnetstat/snmpnetstat$(EXEEXT) agent/snmpd$(EXEEXT): makeall


depend:
	cd snmplib; $(MAKE) depend
	cd apps; $(MAKE) depend
	cd agent; $(MAKE) depend
	cd testing; $(MAKE) depend

nosysdepend:
	cd snmplib; $(MAKE) nosysdepend
	cd apps; $(MAKE) nosysdepend
	cd agent; $(MAKE) nosysdepend
	cd testing; $(MAKE) nosysdepend

makefileindepend:
	cd snmplib; $(MAKE) makefileindepend
	cd apps; $(MAKE) makefileindepend
	cd agent; $(MAKE) makefileindepend
	cd testing; $(MAKE) makefileindepend


clean:
	for i in $(SUBDIRS) $(TESTDIRS); do \
        ( cd $$i ; $(MAKE) clean ) ; \
	done
	rm -f EXAMPLE.conf sedscript ucd-snmp.txt

distclean: clean configclean

configclean:
	rm -f config.cache config.status config.log config.h
	rm -f Makefile snmplib/Makefile				\
		agent/Makefile agent/mibgroup/Makefile		\
		apps/Makefile  apps/snmpnetstat/Makefile	\
		man/Makefile mibs/Makefile ov/Makefile		\
		local/Makefile testing/Makefile
	rm -f mibs/.index
	rm -f mib_module_config.h ucd-snmp-config.h 	\
		agent/mibgroup/mib_module_includes.h 	\
		agent/mibgroup/mib_module_inits.h 	\
		agent/mibgroup/mib_module_shutdown.h 	\
		agent/mibgroup/mib_module_dot_conf.h
	rm -f *.core


$(srcdir)/configure: configure.in aclocal.m4
	cd ${srcdir} && $(AUTOCONF)
	echo "Please run configure now."
	sh -c exit 2


# autoheader might not change config.h.in, so touch a stamp file.
#
$(srcdir)/config.h.in: stamp-h.in
$(srcdir)/stamp-h.in: configure.in acconfig.h
	cd ${srcdir} && LC_COLLATE=C $(AUTOHEADER)
	echo timestamp > ${srcdir}/stamp-h.in

config.h: stamp-h
stamp-h: config.h.in config.status
	CONFIG_FILES= ./config.status
	echo timestamp > stamp-h

touchit:
	touch configure config.h.in
	touch config.status
	touch stamp-h stamp-h.in

Makefile: Makefile.in config.status
	CONFIG_HEADERS= ./config.status

config.status: configure
	./config.status --recheck

EXAMPLE.conf: sedscript EXAMPLE.conf.def
	$(SED) -f sedscript $(srcdir)/EXAMPLE.conf.def > EXAMPLE.conf

TAGS:
	find $(srcdir) -name '*.[ch]' -print | etags -

version:
	@if test "x$(VERSION)" = "x"; then \
	  echo "you need to supply a VERSION string."; \
	  exit 2; \
	fi
	agent/mibgroup/versiontag $(VERSION) reverse

tag:
	agent/mibgroup/versiontag $(VERSION) tag

tar:
	agent/mibgroup/versiontag $(VERSION) tar

dist: version tag tar

FAQ.html:
	local/FAQ2HTML FAQ