Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
qwebaby3
asn1c
Commits
43739168
Commit
43739168
authored
18 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
description
parent
bcda5ff7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/sample.makefile.regen
+24
-10
24 additions, 10 deletions
examples/sample.makefile.regen
with
24 additions
and
10 deletions
examples/sample.makefile.regen
+
24
−
10
View file @
43739168
#!/bin/sh
#
# This script attempts to compile the given ASN.1 specification and then
# transforms the resulting Makefile.am.sample tailored to that specification
# into a customized Makefile.
#
# The information which is necessary for this script is passed from the
# Makefile which is going to be replaced with an updated Makefile.
# This is called "boot-strapping" and is frequently the source of inside jokes.
#
# $Id$
#
if
test
-z
"
$ASN1PDU
"
\
-o
-z
"
$ASN1MODULES
"
\
...
...
@@ -12,7 +23,7 @@ if test -z "$ASN1PDU" \
exit
fi
ASN1PDU
=
`
echo
"
$ASN1PDU
"
|
tr
- _
`
ASN1
DEF
PDU
=
`
echo
"
$ASN1PDU
"
|
tr
- _
`
../../asn1c/asn1c
-S
../../skeletons
${
ASN1CMDOPTS
}
${
ASN1MODULES
}
||
exit
$?
...
...
@@ -21,33 +32,36 @@ if test ! -f Makefile.am.sample ; then
exit
1
fi
EXTRA_CFLAGS
=
""
if
test
-f
config.h
;
then
EXTRA_CFLAGS
=
"
$EXTRA_CFLAGS
-DHAVE_CONFIG_H"
fi
CFLAGS
=
""
FIXEDPDU
=
`
echo
"[
$ASN1CMDOPTS
]"
|
sed
-e
"s/.*-pdu=auto.*//"
`
if
test
!
"
$FIXEDPDU
"
;
then
EXTRA_CFLAGS
=
"
$EXTRA_CFLAGS
-DASN_PDU_COLLECTION"
CFLAGS
=
"
$CFLAGS
-DASN_PDU_COLLECTION"
fi
if
test
-f
config.h
;
then
CFLAGS
=
"
$CFLAGS
-DHAVE_CONFIG_H"
fi
set
-x
cat
Makefile.am.sample
\
|
sed
-e
"s/^CFLAGS.*/CFLAGS +=
-I.
$EXTRA_
CFLAGS
-DPDU=
${
ASN1PDU
}
/"
\
|
sed
-e
"s/^CFLAGS.*/CFLAGS +=
$
CFLAGS
-DPDU=
${
ASN1
DEF
PDU
}
-I.
/"
\
|
sed
-e
"s/^all: /all:
${
ASN1PDU
}
.c /"
\
|
sed
-e
"s/progname/
${
PROGNAME
}
/"
\
>
Makefile.
$$
(
echo
echo
"
${
ASN1PDU
}
.c:
$0
"
echo
" make regen-makefile"
echo
" @touch
${
ASN1PDU
}
.c"
echo
" make"
echo
echo
"regen-makefile:"
echo
" ASN1CMDOPTS=
\"
${
ASN1CMDOPTS
}
\"
\\
"
echo
" ASN1MODULES=
\"
${
ASN1MODULES
}
\"
\\
"
echo
" ASN1PDU=
${
ASN1PDU
}
\\
"
echo
" PROGNAME=
${
PROGNAME
}
\\
"
echo
"
$0
"
echo
" @touch
${
ASN1PDU
}
.c"
echo
" make"
echo
echo
'check: ${TARGET}'
echo
" @if test -f ./sample-
${
ASN1PDU
}
-1.[db]er ; then
\\
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment