~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to lib/snmp/test/test_config/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#-*-makefile-*-   ; force emacs to enter makefile-mode
 
2
 
 
3
# %CopyrightBegin%
 
4
 
5
# Copyright Ericsson AB 1997-2011. All Rights Reserved.
 
6
 
7
# The contents of this file are subject to the Erlang Public License,
 
8
# Version 1.1, (the "License"); you may not use this file except in
 
9
# compliance with the License. You should have received a copy of the
 
10
# Erlang Public License along with this software. If not, it can be
 
11
# retrieved online at http://www.erlang.org/.
 
12
 
13
# Software distributed under the License is distributed on an "AS IS"
 
14
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
15
# the License for the specific language governing rights and limitations
 
16
# under the License.
 
17
 
18
# %CopyrightEnd%
 
19
 
 
20
include $(ERL_TOP)/make/target.mk
 
21
include $(ERL_TOP)/make/$(TARGET)/otp.mk
 
22
 
 
23
 
 
24
# ----------------------------------------------------
 
25
# Application version
 
26
# ----------------------------------------------------
 
27
include ../../vsn.mk
 
28
 
 
29
VSN = $(SNMP_VSN)
 
30
 
 
31
 
 
32
# ----------------------------------------------------
 
33
# Configured variables
 
34
# ----------------------------------------------------
 
35
 
 
36
 
 
37
# ----------------------------------------------------
 
38
# Target Specs
 
39
# ----------------------------------------------------
 
40
 
 
41
include modules.mk
 
42
 
 
43
ERL_TARGETS = $(MODULES:%=$(EBIN)/%.$(EMULATOR))
 
44
 
 
45
SYS_CONFIG_SRCS     = $(SYS_CONFIG_FILES:%=%.src)
 
46
AGENT_CONFIG_SRCS   = $(AGENT_CONFIG_FILES:%=%.src)
 
47
MANAGER_CONFIG_SRCS = $(MANAGER_CONFIG_FILES:%=%.src)
 
48
 
 
49
CONFIG_FILES = \
 
50
        $(SYS_CONFIG_FILES) \
 
51
        $(AGENT_CONFIG_FILES) \
 
52
        $(MANAGER_CONFIG_FILES)
 
53
 
 
54
TARGETS = \
 
55
        $(ERL_TARGETS) \
 
56
        $(CONFIG_FILES)
 
57
 
 
58
 
 
59
# ----------------------------------------------------
 
60
# Release directory specification
 
61
# ----------------------------------------------------
 
62
ifeq ($(TESTROOT),)
 
63
TESTROOT=/tmp
 
64
endif
 
65
RELSYSDIR = $(TESTROOT)
 
66
 
 
67
 
 
68
# ----------------------------------------------------
 
69
# FLAGS AND VARIABLES
 
70
# ----------------------------------------------------
 
71
 
 
72
EBIN = .
 
73
 
 
74
ERL_COMPILE_FLAGS += +'{parse_transform,sys_pre_attributes}' \
 
75
                     +'{attribute,insert,app_vsn,$(APP_VSN)}'
 
76
 
 
77
ifeq ($(ADDR),)
 
78
ADDR = $(shell erl -noshell -s snmp_test_config ip_address -s init stop)
 
79
endif
 
80
 
 
81
ifeq ($(TARGET_NAME_PRE),)
 
82
TARGET_NAME_PRE = $(shell erl -noshell -s snmp_test_config ip_address2 -s init stop)
 
83
endif
 
84
 
 
85
ifeq ($(SYS_CONTACT),)
 
86
SYS_CONTACT = foo@bar.ericsson.se
 
87
endif
 
88
 
 
89
ifeq ($(SYS_LOCATION),)
 
90
SYS_LOCATION = Erlang/OTP
 
91
endif
 
92
 
 
93
ifeq ($(SYS_NAME),)
 
94
SYS_NAME = FOO
 
95
endif
 
96
 
 
97
ifeq ($(AGENT_ENGINE_ID),)
 
98
AGENT_ENGINE_ID = Agent engine of $(USER)
 
99
endif
 
100
 
 
101
ifeq ($(AGENT_USM_ENGINE_ID),)
 
102
AGENT_USM_ENGINE_ID = $(AGENT_ENGINE_ID)
 
103
endif
 
104
 
 
105
ifeq ($(MANAGER_ENGINE_ID),)
 
106
MANAGER_ENGINE_ID = Manager engine of $(USER)
 
107
endif
 
108
 
 
109
ifeq ($(MANAGER_USM_ENGINE_ID),)
 
110
MANAGER_USM_ENGINE_ID = $(MANAGER_ENGINE_ID)
 
111
endif
 
112
 
 
113
 
 
114
 
 
115
# ----------------------------------------------------
 
116
# Targets
 
117
# ----------------------------------------------------
 
118
 
 
119
tests debug opt: $(TARGETS) 
 
120
 
 
121
clean:
 
122
        rm -f $(CONFIG_FILES)
 
123
        rm -f $(ERL_TARGETS)
 
124
        rm -f core
 
125
 
 
126
docs:
 
127
 
 
128
%.config: %.config.src
 
129
        @echo "$< -> $@"
 
130
        $(PERL) -p -e 's?%DIR%?$(RELSYSDIR)? ' < $< > $@
 
131
 
 
132
agent/%.conf: agent/%.conf.src
 
133
        @echo "$< -> $@"
 
134
        sed -e 's?%ADDR%?$(ADDR)? ' \
 
135
            -e 's?%SYS_CONTACT%?$(SYS_CONTACT)? ' \
 
136
            -e 's?%SYS_LOCATION%?$(SYS_LOCATION)? ' \
 
137
            -e 's?%SYS_NAME%?$(SYS_NAME)? ' \
 
138
            -e 's?%TARGET_NAME_PRE%?$(TARGET_NAME_PRE)? ' \
 
139
            -e 's?%ENGINE_ID%?\"$(AGENT_ENGINE_ID)\"? ' \
 
140
            -e 's?%USM_ENGINE_ID%?\"$(AGENT_USM_ENGINE_ID)\"? ' < $< > $@
 
141
 
 
142
manager/%.conf: manager/%.conf.src
 
143
        @echo "$< -> $@"
 
144
        sed -e 's?%ADDR%?$(ADDR)? ' \
 
145
            -e 's?%ENGINE_ID%?\"$(MANAGER_ENGINE_ID)\"? ' \
 
146
            -e 's?%USM_ENGINE_ID%?\"$(MANAGER_USM_ENGINE_ID)\"? ' < $< > $@
 
147
 
 
148
 
 
149
# ----------------------------------------------------
 
150
# Release Target
 
151
# ---------------------------------------------------- 
 
152
include $(ERL_TOP)/make/otp_release_targets.mk
 
153
 
 
154
release_spec:
 
155
 
 
156
release_tests_spec: clean opt
 
157
        $(INSTALL_DIR)  $(RELSYSDIR)
 
158
        chmod -f -R u+w $(RELSYSDIR)
 
159
        $(INSTALL_DIR)  $(RELSYSDIR)/agent
 
160
        chmod -f -R u+w $(RELSYSDIR)/agent
 
161
        $(INSTALL_DIR)  $(RELSYSDIR)/agent/conf
 
162
        chmod -f -R u+w $(RELSYSDIR)/agent/conf
 
163
        $(INSTALL_DIR)  $(RELSYSDIR)/agent/db
 
164
        chmod -f -R u+w $(RELSYSDIR)/agent/db
 
165
        $(INSTALL_DIR)  $(RELSYSDIR)/agent/log
 
166
        chmod -f -R u+w $(RELSYSDIR)/agent/log
 
167
        $(INSTALL_DIR)  $(RELSYSDIR)/manager
 
168
        chmod -f -R u+w $(RELSYSDIR)/manager
 
169
        $(INSTALL_DIR)  $(RELSYSDIR)/manager/conf
 
170
        chmod -f -R u+w $(RELSYSDIR)/manager/conf
 
171
        $(INSTALL_DIR)  $(RELSYSDIR)/manager/db
 
172
        chmod -f -R u+w $(RELSYSDIR)/manager/db
 
173
        $(INSTALL_DIR)  $(RELSYSDIR)/manager/log
 
174
        chmod -f -R u+w $(RELSYSDIR)/manager/log
 
175
        $(INSTALL_DATA) $(SYS_CONFIG_FILES)     $(RELSYSDIR)
 
176
        $(INSTALL_DATA) $(AGENT_CONFIG_FILES)   $(RELSYSDIR)/agent/conf
 
177
        $(INSTALL_DATA) $(MANAGER_CONFIG_FILES) $(RELSYSDIR)/manager/conf
 
178
 
 
179
release_docs_spec:
 
180
 
 
181
 
 
182
info:
 
183
        @echo ""
 
184
        @echo "RELSYSDIR            = $(RELSYSDIR)"
 
185
        @echo ""
 
186
        @echo "SYS_CONFIG_SRCS      = $(SYS_CONFIG_SRCS)"
 
187
        @echo "SYS_CONFIG_FILES     = $(SYS_CONFIG_FILES)"
 
188
        @echo ""
 
189
        @echo "AGENT_CONFIG_SRCS    = $(AGENT_CONFIG_SRCS)"
 
190
        @echo "AGENT_CONFIG_FILES   = $(AGENT_CONFIG_FILES)"
 
191
        @echo ""
 
192
        @echo "MANAGER_CONFIG_SRCS  = $(MANAGER_CONFIG_SRCS)"
 
193
        @echo "MANAGER_CONFIG_FILES = $(MANAGER_CONFIG_FILES)"
 
194
        @echo ""
 
195
        @echo "ADDR            = $(ADDR)"
 
196
        @echo "TARGET_NAME_PRE = $(TARGET_NAME_PRE)"
 
197
        @echo ""
 
198
 
 
199