aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorLars Roland <Lars.Roland@gmx.net>2005-01-16 23:26:02 +0000
committerLars Roland <Lars.Roland@gmx.net>2005-01-16 23:26:02 +0000
commit13bf5539af20a4c372bbcb58c0a0f8d051ab3dbc (patch)
tree6729af791c3a980a4455c5271cb71657d4587889 /asn1
parentce032dd5cf1248a0611ae61902c721eed04888e0 (diff)
When using Cygwin's python asn2eth.py
generates dissectors with mixed EOL! SVN doesn't allow you to commit such files. Add a target to all nmake makefiles in asn1 subdirectory which will fix these files. svn path=/trunk/; revision=13077
Diffstat (limited to 'asn1')
-rw-r--r--asn1/MAP_Dialogue/Makefile.nmake29
-rw-r--r--asn1/cmip/Makefile.nmake32
-rw-r--r--asn1/cms/Makefile.nmake31
-rw-r--r--asn1/ess/Makefile.nmake31
-rw-r--r--asn1/gsmmap/Makefile.nmake30
-rw-r--r--asn1/h225/Makefile.nmake31
-rw-r--r--asn1/h235/Makefile.nmake30
-rw-r--r--asn1/h245/Makefile.nmake31
-rw-r--r--asn1/h248/Makefile.nmake30
-rw-r--r--asn1/h450/Makefile.nmake30
-rw-r--r--asn1/logotype-cert-extn/Makefile.nmake28
-rw-r--r--asn1/ns-cert-exts/Makefile.nmake28
-rw-r--r--asn1/ocsp/Makefile.nmake28
-rw-r--r--asn1/pkcs1/Makefile.nmake29
-rw-r--r--asn1/pkinit/Makefile.nmake28
-rw-r--r--asn1/pkix1explicit/Makefile.nmake28
-rw-r--r--asn1/pkix1implicit/Makefile.nmake29
-rw-r--r--asn1/pkixcmp/Makefile.nmake29
-rw-r--r--asn1/pkixcrmf/Makefile.nmake29
-rw-r--r--asn1/pkixproxy/Makefile.nmake28
-rw-r--r--asn1/pkixqualified/Makefile.nmake28
-rw-r--r--asn1/pkixtsp/Makefile.nmake28
-rw-r--r--asn1/smrse/Makefile.nmake28
-rw-r--r--asn1/x509af/Makefile.nmake28
-rw-r--r--asn1/x509ce/Makefile.nmake29
-rw-r--r--asn1/x509if/Makefile.nmake28
-rw-r--r--asn1/x509sat/Makefile.nmake29
27 files changed, 642 insertions, 145 deletions
diff --git a/asn1/MAP_Dialogue/Makefile.nmake b/asn1/MAP_Dialogue/Makefile.nmake
index 9d55fba1d3..7dae1f3337 100644
--- a/asn1/MAP_Dialogue/Makefile.nmake
+++ b/asn1/MAP_Dialogue/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-MAP_DialoguePDU.c packet-MAP_DialoguePDU.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=MAP_DialoguePDU
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py MAP_DialoguePDU.asn packet-MAP-DialoguePDU-template.c packet-MAP-DialoguePDU-template.h MAP_DialoguePDU.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p MAP_DialoguePDU -c MAP_DialoguePDU.cnf -s packet-MAP-DialoguePDU-template MAP_DialoguePDU.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c MAP_DialoguePDU.cnf -s packet-MAP-DialoguePDU-template MAP_DialoguePDU.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-MAP_DialoguePDU.c ..\..\epan\dissectors /d /y
- xcopy packet-MAP_DialoguePDU.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/cmip/Makefile.nmake b/asn1/cmip/Makefile.nmake
index 80708b4b2f..a1a7cef509 100644
--- a/asn1/cmip/Makefile.nmake
+++ b/asn1/cmip/Makefile.nmake
@@ -4,20 +4,38 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-cmip.c packet-cmip.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=cmip
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py CMIP.asn packet-cmip-template.c packet-cmip-template.h cmip.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py CMIP.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p cmip -c cmip.cnf -s packet-cmip-template CMIP.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template CMIP.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
- rm -f cmip-exp.cnf parsetab.py $(DISSECTOR_FILES)
+ rm -f $(PROTOCOL_NAME)-exp.cnf parsetab.py $(DISSECTOR_FILES)
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
-copy_files: generate_dissector
- xcopy packet-cmip.c ..\..\epan\dissectors /d /y
- xcopy packet-cmip.h ..\..\epan\dissectors /d /y
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/cms/Makefile.nmake b/asn1/cms/Makefile.nmake
index 8f159a034e..4bbaef8195 100644
--- a/asn1/cms/Makefile.nmake
+++ b/asn1/cms/Makefile.nmake
@@ -4,20 +4,39 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-cms.c packet-cms.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=cms
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py CryptographicMessageSyntax.asn packet-cms-template.c packet-cms-template.h cms.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py CryptographicMessageSyntax.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p cms -c cms.cnf -s packet-cms-template CryptographicMessageSyntax.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template CryptographicMessageSyntax.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-cms.c ..\..\epan\dissectors /d /y
- xcopy packet-cms.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/ess/Makefile.nmake b/asn1/ess/Makefile.nmake
index c4b08582a4..acc6e626bf 100644
--- a/asn1/ess/Makefile.nmake
+++ b/asn1/ess/Makefile.nmake
@@ -4,15 +4,21 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-ess.c packet-ess.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=ess
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py ExtendedSecurityServices.asn packet-ess-template.c packet-ess-template.h ess.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py ExtendedSecurityServices.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -k -e -p ess -c ess.cnf -s packet-ess-template ExtendedSecurityServices.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -k -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template ExtendedSecurityServices.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
@@ -24,6 +30,19 @@ clean:
packet-ess-ett.c \
packet-ess-hf.c
-copy_files: generate_dissector
- xcopy packet-ess.c ..\..\epan\dissectors /d /y
- xcopy packet-ess.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/gsmmap/Makefile.nmake b/asn1/gsmmap/Makefile.nmake
index e77368dfb9..bb8acd22e9 100644
--- a/asn1/gsmmap/Makefile.nmake
+++ b/asn1/gsmmap/Makefile.nmake
@@ -4,20 +4,38 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-gsm_map.c packet-gsm_map.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=gsm_map
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py GSMMAP.asn packet-gsm_map-template.c packet-gsm_map-template.h gsmmap.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py GSMMAP.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h gsmmap.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p gsm_map -c gsmmap.cnf -s packet-gsm_map-template GSMMAP.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c gsmmap.cnf -s packet-$(PROTOCOL_NAME)-template GSMMAP.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-gsm_map.c ..\..\epan\dissectors /d /y
- xcopy packet-gsm_map.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/h225/Makefile.nmake b/asn1/h225/Makefile.nmake
index 9f9fd428e7..1e114438da 100644
--- a/asn1/h225/Makefile.nmake
+++ b/asn1/h225/Makefile.nmake
@@ -4,20 +4,39 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-h225.c packet-h225.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=h225
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py h225.asn h225.cnf packet-h225-template.c packet-h225-template.h
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn $(PROTOCOL_NAME).cnf packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -e -p h225 -c h225.cnf -s packet-h225-template h225.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-h225.c ..\..\epan\dissectors /d /y
- xcopy packet-h225.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/h235/Makefile.nmake b/asn1/h235/Makefile.nmake
index 267ec64aea..ffe13fabd9 100644
--- a/asn1/h235/Makefile.nmake
+++ b/asn1/h235/Makefile.nmake
@@ -4,20 +4,38 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-h235.c packet-h235.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=h235
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py packet-h235-template.c packet-h235-template.h h235.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py H235-SECURITY-MESSAGES.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -p h235 -c h235.cnf -s packet-h235-template H235-SECURITY-MESSAGES.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template H235-SECURITY-MESSAGES.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-h235.c ..\..\epan\dissectors /d /y
- xcopy packet-h235.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/h245/Makefile.nmake b/asn1/h245/Makefile.nmake
index d7dfb3c4b3..400f472d6c 100644
--- a/asn1/h245/Makefile.nmake
+++ b/asn1/h245/Makefile.nmake
@@ -4,20 +4,39 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-h245.c packet-h245.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=h245
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py packet-h245-template.c packet-h245-template.h h245.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn $(PROTOCOL_NAME).cnf packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -e -p h245 -c h245.cnf -s packet-h245-template h245.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-h245.c ..\..\epan\dissectors /d /y
- xcopy packet-h245.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/h248/Makefile.nmake b/asn1/h248/Makefile.nmake
index f98043df7b..42e34f8a68 100644
--- a/asn1/h248/Makefile.nmake
+++ b/asn1/h248/Makefile.nmake
@@ -4,20 +4,38 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-h248.c packet-h248.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=h248
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py MEGACO.asn packet-h248-template.c packet-h248-template.h h248.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py MEGACO.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template MEGACO.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-h248.c ..\..\epan\dissectors /d /y
- xcopy packet-h248.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/h450/Makefile.nmake b/asn1/h450/Makefile.nmake
index da194d9379..4fb66bf24f 100644
--- a/asn1/h450/Makefile.nmake
+++ b/asn1/h450/Makefile.nmake
@@ -4,20 +4,38 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-h450.c packet-h450.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=h450
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
generate_dissector: $(DISSECTOR_FILES)
-$(DISSECTOR_FILES): ../../tools/asn2eth.py h4501.asn packet-h450-template.c packet-h450-template.h h450.cnf
+$(DISSECTOR_FILES): ../../tools/asn2eth.py h4501.asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p h450 -c h450.cnf -s packet-h450-template h4501.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template h4501.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-h450.c ..\..\epan\dissectors /d /y
- xcopy packet-h450.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/logotype-cert-extn/Makefile.nmake b/asn1/logotype-cert-extn/Makefile.nmake
index faf3259d46..ffc4e31a02 100644
--- a/asn1/logotype-cert-extn/Makefile.nmake
+++ b/asn1/logotype-cert-extn/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-logotypecertextn.c packet-logotypecertextn.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=logotypecertextn
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py LogotypeCertExtn.asn packet-logotype-cert-extn-template.c packet-logotype-cert-extn-template.h logotype-cert-extn.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p logotypecertextn -c logotype-cert-extn.cnf -s packet-logotype-cert-extn-template LogotypeCertExtn.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c logotype-cert-extn.cnf -s packet-logotype-cert-extn-template LogotypeCertExtn.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-logotypecertextn.c ..\..\epan\dissectors /d /y
- xcopy packet-logotypecertextn.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/ns-cert-exts/Makefile.nmake b/asn1/ns-cert-exts/Makefile.nmake
index 10446c8ee7..ae05400ad9 100644
--- a/asn1/ns-cert-exts/Makefile.nmake
+++ b/asn1/ns-cert-exts/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-ns_cert_exts.c packet-ns_cert_exts.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=ns_cert_exts
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py NETSCAPE-CERT-EXTS.asn packet-ns_cert_exts-template.c packet-ns_cert_exts-template.h ns_cert_exts.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p ns_cert_exts -c ns_cert_exts.cnf -s packet-ns_cert_exts-template NETSCAPE-CERT-EXTS.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c ns_cert_exts.cnf -s packet-ns_cert_exts-template NETSCAPE-CERT-EXTS.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-ns_cert_exts.c ..\..\epan\dissectors /d /y
- xcopy packet-ns_cert_exts.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/ocsp/Makefile.nmake b/asn1/ocsp/Makefile.nmake
index 074085770f..c50053a05e 100644
--- a/asn1/ocsp/Makefile.nmake
+++ b/asn1/ocsp/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-ocsp.c packet-ocsp.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=ocsp
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py OCSP.asn packet-ocsp-template.c packet-ocsp-template.h ocsp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p ocsp -c ocsp.cnf -s packet-ocsp-template OCSP.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c ocsp.cnf -s packet-ocsp-template OCSP.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-ocsp.c ..\..\epan\dissectors /d /y
- xcopy packet-ocsp.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/pkcs1/Makefile.nmake b/asn1/pkcs1/Makefile.nmake
index 9283c6ee2f..d10630d878 100644
--- a/asn1/pkcs1/Makefile.nmake
+++ b/asn1/pkcs1/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkcs1.c packet-pkcs1.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkcs1
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKCS1.asn packet-pkcs1-template.c packet-pkcs1-template.h pkcs1.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -p pkcs1 -c pkcs1.cnf -s packet-pkcs1-template PKCS1.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -p $(PROTOCOL_NAME) -c pkcs1.cnf -s packet-pkcs1-template PKCS1.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkcs1.c ..\..\epan\dissectors /d /y
- xcopy packet-pkcs1.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/pkinit/Makefile.nmake b/asn1/pkinit/Makefile.nmake
index 8d6106ebdb..c3f55d8638 100644
--- a/asn1/pkinit/Makefile.nmake
+++ b/asn1/pkinit/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkinit.c packet-pkinit.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkinit
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKINIT.asn packet-pkinit-template.c packet-pkinit-template.h pkinit.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -e -X -b -p pkinit -c pkinit.cnf -s packet-pkinit-template PKINIT.asn
+ $(PYTHON) ../../tools/asn2eth.py -e -X -b -p $(PROTOCOL_NAME) -c pkinit.cnf -s packet-pkinit-template PKINIT.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkinit.c ..\..\epan\dissectors /d /y
- xcopy packet-pkinit.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/pkix1explicit/Makefile.nmake b/asn1/pkix1explicit/Makefile.nmake
index 9d4ca6f483..19e15b6de2 100644
--- a/asn1/pkix1explicit/Makefile.nmake
+++ b/asn1/pkix1explicit/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkix1explicit.c packet-pkix1explicit.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkix1explicit
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKIX1EXPLICIT93.asn packet-pkix1explicit-template.c packet-pkix1explicit-template.h pkix1explicit.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -e -X -b -p pkix1explicit -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn
+ $(PYTHON) ../../tools/asn2eth.py -e -X -b -p $(PROTOCOL_NAME) -c pkix1explicit.cnf -s packet-pkix1explicit-template PKIX1EXPLICIT93.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkix1explicit.c ..\..\epan\dissectors /d /y
- xcopy packet-pkix1explicit.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/pkix1implicit/Makefile.nmake b/asn1/pkix1implicit/Makefile.nmake
index 09822cbadb..9320168abe 100644
--- a/asn1/pkix1implicit/Makefile.nmake
+++ b/asn1/pkix1implicit/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkix1implicit.c packet-pkix1implicit.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkix1implicit
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKIX1IMPLICIT93.asn packet-pkix1implicit-template.c packet-pkix1implicit-template.h pkix1implicit.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -e -X -b -p pkix1implicit -c pkix1implicit.cnf -s packet-pkix1implicit-template PKIX1IMPLICIT93.asn
+ $(PYTHON) ../../tools/asn2eth.py -e -X -b -p $(PROTOCOL_NAME) -c pkix1implicit.cnf -s packet-pkix1implicit-template PKIX1IMPLICIT93.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkix1implicit.c ..\..\epan\dissectors /d /y
- xcopy packet-pkix1implicit.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/pkixcmp/Makefile.nmake b/asn1/pkixcmp/Makefile.nmake
index 2c924d0061..fc5970ec6b 100644
--- a/asn1/pkixcmp/Makefile.nmake
+++ b/asn1/pkixcmp/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-cmp.c packet-cmp.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=cmp
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py CMP.asn packet-cmp-template.c packet-cmp-template.h cmp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p cmp -c cmp.cnf -s packet-cmp-template CMP.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c cmp.cnf -s packet-cmp-template CMP.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-cmp.c ..\..\epan\dissectors /d /y
- xcopy packet-cmp.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/pkixcrmf/Makefile.nmake b/asn1/pkixcrmf/Makefile.nmake
index 6780cfa83f..d0b3c4b4f4 100644
--- a/asn1/pkixcrmf/Makefile.nmake
+++ b/asn1/pkixcrmf/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-crmf.c packet-crmf.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=crmf
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py CRMF.asn packet-crmf-template.c packet-crmf-template.h crmf.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p crmf -c crmf.cnf -s packet-crmf-template CRMF.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c crmf.cnf -s packet-crmf-template CRMF.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-crmf.c ..\..\epan\dissectors /d /y
- xcopy packet-crmf.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/pkixproxy/Makefile.nmake b/asn1/pkixproxy/Makefile.nmake
index fde7294aa2..642f8525a2 100644
--- a/asn1/pkixproxy/Makefile.nmake
+++ b/asn1/pkixproxy/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkixproxy.c packet-pkixproxy.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkixproxy
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKIXProxy.asn packet-pkixproxy-template.c packet-pkixproxy-template.h pkixproxy.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p pkixproxy -c pkixproxy.cnf -s packet-pkixproxy-template PKIXProxy.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c pkixproxy.cnf -s packet-pkixproxy-template PKIXProxy.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkixproxy.c ..\..\epan\dissectors /d /y
- xcopy packet-pkixproxy.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/pkixqualified/Makefile.nmake b/asn1/pkixqualified/Makefile.nmake
index 3cfa578ee8..c26ec28919 100644
--- a/asn1/pkixqualified/Makefile.nmake
+++ b/asn1/pkixqualified/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkixqualified.c packet-pkixqualified.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkixqualified
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKIXqualified.asn packet-pkixqualified-template.c packet-pkixqualified-template.h pkixqualified.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p pkixqualified -c pkixqualified.cnf -s packet-pkixqualified-template PKIXqualified.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c pkixqualified.cnf -s packet-pkixqualified-template PKIXqualified.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkixqualified.c ..\..\epan\dissectors /d /y
- xcopy packet-pkixqualified.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/pkixtsp/Makefile.nmake b/asn1/pkixtsp/Makefile.nmake
index f99021f00f..1f50c6edcb 100644
--- a/asn1/pkixtsp/Makefile.nmake
+++ b/asn1/pkixtsp/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-pkixtsp.c packet-pkixtsp.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=pkixtsp
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py PKIXTSP.asn packet-pkixtsp-template.c packet-pkixtsp-template.h pkixtsp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p pkixtsp -c pkixtsp.cnf -s packet-pkixtsp-template PKIXTSP.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c pkixtsp.cnf -s packet-pkixtsp-template PKIXTSP.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-pkixtsp.c ..\..\epan\dissectors /d /y
- xcopy packet-pkixtsp.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/smrse/Makefile.nmake b/asn1/smrse/Makefile.nmake
index 5f518296f1..6e60e65b4e 100644
--- a/asn1/smrse/Makefile.nmake
+++ b/asn1/smrse/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-smrse.c packet-smrse.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=smrse
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py SMRSE.asn packet-smrse-template.c packet-smrse-template.h smrse.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p smrse -c smrse.cnf -s packet-smrse-template SMRSE.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c smrse.cnf -s packet-smrse-template SMRSE.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-smrse.c ..\..\epan\dissectors /d /y
- xcopy packet-smrse.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/x509af/Makefile.nmake b/asn1/x509af/Makefile.nmake
index a9d551246c..1e14d4f63d 100644
--- a/asn1/x509af/Makefile.nmake
+++ b/asn1/x509af/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-x509af.c packet-x509af.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=x509af
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py AuthenticationFramework.asn packet-x509af-template.c packet-x509af-template.h x509af.cnf ../x509if/x509if-exp.cnf ../x509sat/x509sat-exp.cnf ../x509ce/x509ce-exp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p x509af -c x509af.cnf -s packet-x509af-template AuthenticationFramework.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c x509af.cnf -s packet-x509af-template AuthenticationFramework.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-x509af.c ..\..\epan\dissectors /d /y
- xcopy packet-x509af.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/x509ce/Makefile.nmake b/asn1/x509ce/Makefile.nmake
index aa7ef73506..4887b45b36 100644
--- a/asn1/x509ce/Makefile.nmake
+++ b/asn1/x509ce/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-x509ce.c packet-x509ce.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=x509ce
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py CertificateExtensions.asn packet-x509ce-template.c packet-x509ce-template.h x509ce.cnf ../x509if/x509if-exp.cnf ../x509sat/x509sat-exp.cnf ../x509af/x509af-exp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p x509ce -c x509ce.cnf -s packet-x509ce-template CertificateExtensions.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c x509ce.cnf -s packet-x509ce-template CertificateExtensions.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-x509ce.c ..\..\epan\dissectors /d /y
- xcopy packet-x509ce.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/x509if/Makefile.nmake b/asn1/x509if/Makefile.nmake
index 262f4657b3..2d562986b4 100644
--- a/asn1/x509if/Makefile.nmake
+++ b/asn1/x509if/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-x509if.c packet-x509if.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=x509if
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,27 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py InformationFramework.asn packet-x509if-template.c packet-x509if-template.h x509if.cnf ../x509sat/x509sat-exp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p x509if -c x509if.cnf -s packet-x509if-template InformationFramework.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c x509if.cnf -s packet-x509if-template InformationFramework.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-x509if.c ..\..\epan\dissectors /d /y
- xcopy packet-x509if.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
diff --git a/asn1/x509sat/Makefile.nmake b/asn1/x509sat/Makefile.nmake
index d9260a35f5..25d633f0f1 100644
--- a/asn1/x509sat/Makefile.nmake
+++ b/asn1/x509sat/Makefile.nmake
@@ -4,7 +4,10 @@
include ../../config.nmake
-DISSECTOR_FILES=packet-x509sat.c packet-x509sat.h
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=x509sat
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
all: generate_dissector
@@ -12,12 +15,28 @@ generate_dissector: $(DISSECTOR_FILES)
$(DISSECTOR_FILES): ../../tools/asn2eth.py SelectedAttributeTypes.asn packet-x509sat-template.c packet-x509sat-template.h x509sat.cnf ../x509if/x509if-exp.cnf
!IFDEF PYTHON
- $(PYTHON) ../../tools/asn2eth.py -X -b -e -p x509sat -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn
+ $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c x509sat.cnf -s packet-x509sat-template SelectedAttributeTypes.asn
+!ELSE
+ @echo Error: You need Python to use asn2eth.py
+ @exit 1
!ENDIF
clean:
rm -f parsetab.py $(DISSECTOR_FILES)
-copy_files: generate_dissector
- xcopy packet-x509sat.c ..\..\epan\dissectors /d /y
- xcopy packet-x509sat.h ..\..\epan\dissectors /d /y
+# Fix EOL in generated dissectors. Cygwin's python generates files with
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+ move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+ move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+ $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+ del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+ xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+ xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+