Commit 59229a76 authored by Botond Baranyi's avatar Botond Baranyi Committed by Gerrit Code Review
Browse files

Merge "makefilegen: asn1 file name check now only checks the file name"

parents 8c55ad11 77546152
...@@ -1250,7 +1250,8 @@ static void add_file_to_makefile(struct makefile_struct *makefile, char *argumen ...@@ -1250,7 +1250,8 @@ static void add_file_to_makefile(struct makefile_struct *makefile, char *argumen
add_ttcn3_module(makefile, file_name, module_name); add_ttcn3_module(makefile, file_name, module_name);
} }
} else if (is_asn1_module(file_name, fp, &module_name)) { } else if (is_asn1_module(file_name, fp, &module_name)) {
if (is_valid_asn1_filename(file_name)) { expstring_t only_file_name = get_file_from_path(file_name);
if (is_valid_asn1_filename(only_file_name)) {
add_asn1_module(makefile, file_name, module_name); add_asn1_module(makefile, file_name, module_name);
} else { } else {
ERROR("The file name `%s' (without suffix) shall be identical to the module name `%s'.\n" ERROR("The file name `%s' (without suffix) shall be identical to the module name `%s'.\n"
...@@ -1258,6 +1259,7 @@ static void add_file_to_makefile(struct makefile_struct *makefile, char *argumen ...@@ -1258,6 +1259,7 @@ static void add_file_to_makefile(struct makefile_struct *makefile, char *argumen
"file name shall contain an underscore character instead.", file_name, module_name); "file name shall contain an underscore character instead.", file_name, module_name);
Free(module_name); Free(module_name);
} }
Free(only_file_name);
} else if (is_xsd_module(file_name, &module_name)) { } else if (is_xsd_module(file_name, &module_name)) {
add_xsd_module(makefile, file_name, module_name); add_xsd_module(makefile, file_name, module_name);
} else { } else {
......
##############################################################################
# Copyright (c) 2000-2016 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Szabo, Bence Janos
#
##############################################################################
TOPDIR := ../..
include $(TOPDIR)/Makefile.regression
ifdef LCOV
COVERAGE_FLAG := -C
endif
MFGEN := $(TTCN3_DIR)/bin/ttcn3_makefilegen
MFGEN_FLAGS := -sf $(RT2_FLAG) $(SPLIT_FLAG)
FOLDER := folder-with-hyphen
FILES := $(FOLDER)/ASN1Module1.asn
# ${MAKEPROG} has the same content as the built-in ${MAKE},
# except the special handling of ${MAKE} does not apply.
# If we used ${MAKE} in the rules below, 'make -n' would succeed once,
# then fail on every subsequent invocation until a 'make clean' is done.
MAKEPROG := ${MAKE}
all:
$(MFGEN) $(MFGEN_FLAGS) -o GenMakefile $(FILES) && rm GenMakefile
.PHONY: all clean distclean run
--/////////////////////////////////////////////////////////////////////////////
-- Copyright (c) 2000-2016 Ericsson Telecom AB
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v1.0
-- which accompanies this distribution, and is available at
-- http://www.eclipse.org/legal/epl-v10.html
--
-- Contributors:
-- Szabo, Bence Janos
--
--/////////////////////////////////////////////////////////////////////////////
ASN1Module1
DEFINITIONS
AUTOMATIC TAGS
::=
BEGIN
IMPORTS ; -- nothing
asn1module1 INTEGER ::= 1
END
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment