Commit 99705af0 authored by ASN.1 Documenter's avatar ASN.1 Documenter
Browse files

Makefile to validate

parent 6a2e99f6
Loading
Loading
Loading
Loading
+13 −6
Changes for .gitlab-ci.yml: 13 added lines, 6 removed lines.
Original line number Diff line number Diff line
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/doxygen
image: alpine

validate:
  stage: test
  script: make validate
  cache:
    paths:
      - asn2md.py
      - iso/*
  only:
    changes:
      - ./*.asn
    
documentation:
#  variables:
#    GIT_STRATEGY: clone
  stage: build
  script:
    - mkdir -p docs
    - python asn2md.py docs `find . -iname '*.asn'`
    - curl https://gitlab-ci-token:$CI_DOC_TOKEN@forge.etsi.org/rep/forge-tools/asn2md/raw/master/asn2md.py
    - make doc
    - git add docs/*.md
    - git commit -m "Documentation update"
    - git remote rm origin && git remote add origin https://gitlab-ci-token:$CI_DOC_TOKEN@forge.etsi.org/rep/$CI_PROJECT_PATH.git
+x+45
Changes for Makefile: 45 added lines, 0 removed lines.
Original line number Diff line number Diff line
ASN1_SRC   :=  IMZM-PDU-Descriptions.asn \
               cam/CAM-PDU-Descriptions.asn \
               vam/VAM-Temp-Imports.asn \
               cdd/ITS-Container.asn

ASN1_SRC_VALIDATE := \
               iso/iso19091_2018.asn \
               iso/iso24534-3_1_2015.asn \
               iso/iso24534-3_2_2015.asn \
               iso/ISO14816_AVIAEINumberingAndDataStructures.asn

ASN1_PDU := IMZM


ASN1CDIR    ?= $(USERPROFILE)/Work/asn1c-fillabs
ifneq (,$(ASN1CDIR))
  ASN1C := $(ASN1CDIR)/asn1c/.libs/asn1c -S $(ASN1CDIR)/skeletons
else
  ASN1C := asn1c
endif

validate: build iso build/gen_flag

doc: docs
	python asn2md.py docs $(ASN1_SRC)
		
build iso docs:
	mkdir -p $@

build/gen_flag: $(ASN1_SRC) $(ASN1_SRC_VALIDATE)
	$(ASN1C) -E -F -fcompound-names -fknown-extern-type=DATE -D build $(addprefix -pdu=,$(ASN1_PDU)) $^
clean:
	rm -rf build

iso/iso19091_2018.asn: 
	curl -o $@ 'https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn'

iso/iso24534-3_1_2015.asn:
	curl -o $@ 'https://standards.iso.org/iso/24534/-3/ISO%2024534-3%20ASN.1%20repository/ISO24534-3_ElectronicRegistrationIdentificationVehicleDataModule_ForBallot.asn'

iso/iso24534-3_2_2015.asn:
	curl -o $@ 'https://standards.iso.org/iso/24534/-3/ISO%2024534-3%20ASN.1%20repository/ISO24534-3_ElectronicRegistrationIdentificationEfcVehicleDataModule_ForBallot.asn'

iso/ISO14816_AVIAEINumberingAndDataStructures.asn:
	curl -o $@ 'https://standards.iso.org/iso/14816/ISO14816%20ASN.1%20repository/ISO14816_AVIAEINumberingAndDataStructures.asn'
−x−162

File deleted.