1# 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 1996-2020. All Rights Reserved. 5# 6# Licensed under the Apache License, Version 2.0 (the "License"); 7# you may not use this file except in compliance with the License. 8# You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, software 13# distributed under the License is distributed on an "AS IS" BASIS, 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15# See the License for the specific language governing permissions and 16# limitations under the License. 17# 18# %CopyrightEnd% 19# 20include $(ERL_TOP)/make/target.mk 21include $(ERL_TOP)/make/$(TARGET)/otp.mk 22 23# ---------------------------------------------------- 24# Target Specs 25# ---------------------------------------------------- 26 27MODULES= \ 28 mt \ 29 mnesia_SUITE \ 30 mnesia_bench_SUITE \ 31 mnesia_test_lib \ 32 mnesia_install_test \ 33 mnesia_registry_test \ 34 mnesia_config_test \ 35 mnesia_frag_test \ 36 mnesia_inconsistent_database_test \ 37 mnesia_config_backup \ 38 mnesia_config_event \ 39 mnesia_examples_test \ 40 mnesia_nice_coverage_test \ 41 mnesia_evil_coverage_test \ 42 mnesia_evil_backup \ 43 mnesia_trans_access_test \ 44 mnesia_dirty_access_test \ 45 mnesia_atomicity_test \ 46 mnesia_consistency_test \ 47 mnesia_majority_test \ 48 mnesia_isolation_test \ 49 mnesia_durability_test \ 50 mnesia_recovery_test \ 51 mnesia_qlc_test \ 52 mnesia_schema_recovery_test \ 53 mnesia_measure_test \ 54 mnesia_cost \ 55 mnesia_dbn_meters \ 56 ext_test \ 57 mnesia_index_plugin_test 58 59DocExamplesDir := ../doc/src/ 60 61DocExampleModules = \ 62 company \ 63 company_o \ 64 bup 65 66DocExamplesHrl = \ 67 company.hrl \ 68 company_o.hrl 69 70ExamplesDir := ../examples/ 71 72ExampleModules = \ 73 mnesia_meter \ 74 mnesia_tpcb 75 76ERL_FILES= $(MODULES:%=%.erl) $(DocExampleModules:%=$(DocExamplesDir)/%.erl) $(ExampleModules:%=$(ExamplesDir)/%.erl) 77 78HRL_FILES= mnesia_test_lib.hrl $(DocExamplesHrl:%=$(DocExamplesDir)/%) 79 80TARGET_FILES= \ 81 $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(DocExampleModules:%=$(EBIN)/%.$(EMULATOR)) $(ExampleModules:%=$(EBIN)/%.$(EMULATOR)) 82 83INSTALL_PROGS= $(TARGET_FILES) 84 85# ---------------------------------------------------- 86# Release directory specification 87# ---------------------------------------------------- 88RELSYSDIR = $(RELEASE_PATH)/mnesia_test 89 90# ---------------------------------------------------- 91# FLAGS 92# ---------------------------------------------------- 93#ERL_COMPILE_FLAGS += 94 95EBIN = . 96 97# ---------------------------------------------------- 98# Targets 99# ---------------------------------------------------- 100 101tests debug opt: $(TARGET_FILES) 102 103$(EBIN)/%.beam: $(DocExamplesDir)/%.erl 104 $(ERLC) -bbeam $(ERL_COMPILE_FLAGS) -o$(EBIN) $< 105 106$(EBIN)/%.beam: $(ExamplesDir)/%.erl 107 $(ERLC) -bbeam $(ERL_COMPILE_FLAGS) -o$(EBIN) $< 108 109clean: 110 rm -f $(TARGET_FILES) 111 rm -f core 112 113docs: 114 115# ---------------------------------------------------- 116# Release Target 117# ---------------------------------------------------- 118include $(ERL_TOP)/make/otp_release_targets.mk 119 120release_spec: opt 121 122release_tests_spec: opt 123 $(INSTALL_DIR) "$(RELSYSDIR)" 124 $(INSTALL_DATA) mnesia.spec mnesia_bench.spec mnesia.cover $(ERL_FILES) $(HRL_FILES) "$(RELSYSDIR)" 125 $(INSTALL_SCRIPT) mt $(INSTALL_PROGS) "$(RELSYSDIR)" 126# chmod -R u+w "$(RELSYSDIR)" 127# @tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -) 128 129release_docs_spec: 130 131 132