Permalink
Browse files

Build gnat_ugn using the "xgnatugn" preprocessor. like upstream does.

  • Loading branch information...
1 parent 8f0b2b7 commit 5e5a84307e0341533f605f374f7d95d2a5bfaba8 @SamB committed Mar 28, 2012
Showing with 1,718 additions and 18 deletions.
  1. +46 −13 debian/Makefile
  2. +9 −0 debian/changelog
  3. +1 −1 debian/control
  4. +9 −4 debian/extract-doc-tarball-from-upstream
  5. +230 −0 gcc/ada/ug_words
  6. +1,423 −0 gcc/ada/xgnatugn.adb
View
@@ -1,9 +1,9 @@
-I_GCC = gcc gccint cpp cppinternals
+I_GCC = gcc gccint cpp cppinternals # install
I_FORTRAN = gfortran
-I_ADA = gnat-style gnat_rm gnat_ugn
+I_ADA = gnat-style gnat_rm # gnat_ugn
I_GCJ = gcj
I_GO = gccgo
-I = $(I_GCC) $(I_FORTRAN) $(I_ADA) $(I_GCJ) $(I_GO)
+I = $(I_GCC) $(I_FORTRAN) $(I_ADA) gnat_ugn $(I_GCJ) $(I_GO)
INFODOCS = $(I:%=%-$(VER).info) gccinstall-$(VER).info
HTMLDOCS = $(I:%=%.html)
@@ -19,7 +19,8 @@ FULLVER = $(GCC_VERSION)
GCCVERS = gcc/doc/gcc-vers.texi
TARGETS = $(INFODOCS) $(HTMLDOCS) $(MANS)
-GENFILES = $(TARGETS) $(PODS) $(GCCVERS)
+GENFILES_GNAT = xgnatugn* gcc/doc/gnat_ugn.texi gcc/doc/projects.texi
+GENFILES = $(TARGETS) $(PODS) $(GCCVERS) $(GENFILES_GNAT)
MKINFO_DEFINES := -D "fncpp cpp-$(VER)" \
-D "fncppint cppinternals-$(VER)" \
@@ -37,29 +38,29 @@ MKINFO = makeinfo $(MKINFO_DEFINES) $(MKINFO_FLAGS)
TEXI2POD_DEFINES := -Dfngccint=gccint-$(VER) -DBUGURL=http://bugs.debian.org/
TEXI2POD = perl ../../contrib/texi2pod.pl $(TEXI2POD_DEFINES)
+
all : $(TARGETS)
-$(I_GCC:%=%-$(VER).info) : %-$(VER).info : gcc/doc/%.texi $(GCCVERS)
- $(MKINFO) -o $@ $<
-gccinstall-$(VER).info : gcc/doc/install.texi $(GCCVERS)
+#
+# Simple makeinfo rules
+#
+
+$(I_GCC:%=%-$(VER).info) : %-$(VER).info : gcc/doc/%.texi $(GCCVERS)
$(MKINFO) -o $@ $<
$(I_GCC:%=%.html) : %.html : gcc/doc/%.texi $(GCCVERS)
$(MKINFO) --html -o $@ $<
+gccinstall-$(VER).info : gcc/doc/install.texi $(GCCVERS)
+ $(MKINFO) -o $@ $<
+
$(I_FORTRAN:%=%-$(VER).info) : %-$(VER).info : gcc/fortran/%.texi $(GCCVERS)
$(MKINFO) -o $@ $<
$(I_FORTRAN:%=%.html) : %.html : gcc/fortran/%.texi $(GCCVERS)
$(MKINFO) --html -o $@ $<
-$(I_ADA:%=%-$(VER).info) : %-$(VER).info : gcc/ada/%.texi $(GCCVERS)
- $(MKINFO) -D unw -o $@ $<
-
-$(I_ADA:%=%.html) : %.html : gcc/ada/%.texi $(GCCVERS)
- $(MKINFO) -D unw --html -o $@ $<
-
$(I_GCJ:%=%-$(VER).info) : %-$(VER).info : gcc/java/%.texi $(GCCVERS)
$(MKINFO) -o $@ $<
@@ -72,6 +73,37 @@ $(I_GO:%=%-$(VER).info) : %-$(VER).info : gcc/go/%.texi $(GCCVERS)
$(I_GO:%=%.html) : %.html : gcc/go/%.texi $(GCCVERS)
$(MKINFO) --html -o $@ $<
+
+#
+# ADA/GNAT documentation
+#
+
+xgnatugn : gcc/ada/xgnatugn.adb
+ gnatmake gcc/ada/xgnatugn
+
+gcc/doc/gnat_ugn.texi : gcc/ada/gnat_ugn.texi xgnatugn gcc/doc/projects.texi
+ ./xgnatugn unw $< gcc/ada/ug_words $@
+
+gcc/doc/projects.texi : gcc/ada/projects.texi xgnatugn
+ ./xgnatugn unw $< gcc/ada/ug_words $@
+
+gnat_ugn-$(VER).info : gcc/doc/gnat_ugn.texi $(GCCVERS)
+ $(MKINFO) -o $@ $<
+
+gnat_ugn.html : gcc/doc/gnat_ugn.texi $(GCCVERS)
+ $(MKINFO) --html -o $@ $<
+
+$(I_ADA:%=%-$(VER).info) : %-$(VER).info : gcc/ada/%.texi $(GCCVERS)
+ $(MKINFO) -o $@ $<
+
+$(I_ADA:%=%.html) : %.html : gcc/ada/%.texi $(GCCVERS)
+ $(MKINFO) --html -o $@ $<
+
+
+#
+# Manpages
+#
+
%-$(VER).1 : %.pod
pod2man --center="GNU" --release="gcc-$(FULLVER)" --section=1 $< > $@
@@ -93,6 +125,7 @@ gfortran.pod: gcc/fortran/invoke.texi $(GCCVERS)
gccgo.pod: gcc/go/gccgo.texi $(GCCVERS)
(cd gcc/go && $(TEXI2POD)) < $< > $@
+
$(GCCVERS) :
(echo @set version-GCC $(FULLVER); \
echo @clear DEVELOPMENT; \
View
@@ -1,3 +1,12 @@
+gcc-4.6-doc-non-dfsg (4.6.2-1~naesten5) UNRELEASED; urgency=low
+
+ * Build gnat_ugn the way it's built upstream, using the "xgnatugn"
+ preprocessor.
+ + Update debian/extract-doc-tarball-from-upstream to include the
+ needed files in .orig tarballs.
+
+ -- Samuel Bronson <naesten@gmail.com> Sun, 04 Mar 2012 14:32:51 -0500
+
gcc-4.6-doc-non-dfsg (4.6.2-1~naesten4) unstable; urgency=low
* debian/copyright:
View
@@ -3,7 +3,7 @@ Section: non-free/doc
Priority: optional
Maintainer: Samuel Bronson <naesten@gmail.com>
Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: texinfo, perl
+Build-Depends-Indep: texinfo, perl, gnat-4.6 | gnat
Standards-Version: 3.9.3
Homepage: http://gcc.gnu.org/
Vcs-Browser: https://github.com/SamB/debian-gcc-doc
@@ -34,14 +34,19 @@ except ValueError:
outfn = '%s_%s.orig.tar.gz' % (pkg, ver)
-# directory that output tarball would extract to
-outdir = '%s-%s' % (pkg, ver)
+# directory that the output tarball would extract to
+outdir = '%s-%s.orig' % (pkg, ver)
intar = tarfile.open(infn, 'r|*', format=tarfile.PAX_FORMAT)
outtar = tarfile.open(outfn, 'w:gz')
-pat = re.compile(r"^gcc/.*\.(7|texi)$ | ^libiberty/at-file.texi$ | ^contrib/texi2pod\.pl$",
- re.VERBOSE)
+pat_s = r"""
+ ^gcc/.*\.(7|texi)$
+| ^gcc/ada/(xgnatugn.adb|ug_words)$
+| ^libiberty/at-file.texi$
+| ^contrib/texi2pod\.pl$
+"""
+pat = re.compile(pat_s, re.VERBOSE)
for member in intar:
if not member.isreg():
View
@@ -0,0 +1,230 @@
+b_ ^ B_
+b~ ^ B__
+cc1 ^ CC1
+Cc1 ^ CC1
+emacs ^ EMACS
+Emacs ^ EMACS
+gdb ^ GDB
+Gdb ^ GDB
+gnat1 ^ GNAT1
+Gnat1 ^ GNAT1
+gnatbind ^ GNAT BIND
+Gnatbind ^ GNAT BIND
+gnatcheck ^ GNAT CHECK
+Gnatcheck ^ GNAT CHECK
+gnatchop ^ GNAT CHOP
+Gnatchop ^ GNAT CHOP
+gnatclean ^ GNAT CLEAN
+Gnatclean ^ GNAT CLEAN
+gnatelim ^ GNAT ELIM
+Gnatelim ^ GNAT ELIM
+gnatf ^ GNAT XREF
+Gnatf ^ GNAT XREF
+gnatfind ^ GNAT FIND
+Gnatfind ^ GNAT FIND
+gnatkr ^ GNAT KRUNCH
+Gnatkr ^ GNAT KRUNCH
+gnatlink ^ GNAT LINK
+Gnatlink ^ GNAT LINK
+gnatls ^ GNAT LIST
+Gnatls ^ GNAT LIST
+gnatmake ^ GNAT MAKE
+Gnatmake ^ GNAT MAKE
+gnatmetric ^ GNAT METRIC
+Gnatmetric ^ GNAT METRIC
+gnatname ^ GNAT NAME
+Gnatname ^ GNAT NAME
+gnatpp ^ GNAT PRETTY
+Gnatpp ^ GNAT PRETTY
+gnatprep ^ GNAT PREPROCESS
+Gnatprep ^ GNAT PREPROCESS
+gnatstub ^ GNAT STUB
+Gnatstub ^ GNAT STUB
+gnatxref ^ GNAT XREF
+Gnatxref ^ GNAT XREF
+gcc ^ GNAT COMPILE
+gcc -c ^ GNAT COMPILE
+-fno-inline ^ /INLINE=SUPPRESS
+-fstack-check ^ /CHECKS=STACK
+-fno-strict-aliasing ^ /OPTIMIZE=NO_STRICT_ALIASING
+-gnata ^ /CHECKS=ASSERTIONS
+-gnatA ^ /NO_GNAT_ADC
+-gnatb ^ /REPORT_ERRORS=BRIEF
+-gnatB ^ /ASSUME_VALID
+-gnatc ^ /NOLOAD
+-gnatct ^ /NOLOAD /TREE_OUTPUT
+-gnatdc ^ /TRACE_UNITS
+-gnatdO ^ /REPORT_ERRORS=IMMEDIATE
+-gnatC ^ /COMPRESS_NAMES
+-gnatDG ^ /XDEBUG /EXPAND_SOURCEA
+-gnatD ^ /XDEBUG
+-gnatec ^ /CONFIGURATION_PRAGMAS_FILE
+-gnateE ^ /EXTRA_EXCEPTION_INFORMATION
+-gnateD ^ /SYMBOL_PREPROCESSING
+-gnatef ^ /FULL_PATH_IN_BRIEF_MESSAGES
+-gnateG ^ /GENERATE_PROCESSED_SOURCE
+-gnatem ^ /MAPPING_FILE
+-gnatep ^ /DATA_PREPROCESSING
+-gnateS ^ /SCO_OUTPUT
+-gnatE ^ /CHECKS=ELABORATION
+-gnatf ^ /REPORT_ERRORS=FULL
+-gnatF ^ /UPPERCASE_EXTERNALS
+-gnatg ^ /STYLE_CHECKS=GNAT
+-gnatG ^ /EXPAND_SOURCE
+-gnatk ^ /FILE_NAME_MAX_LENGTH
+-gnatl ^ /LIST
+-gnatL ^ /LONGJMP_SETJMP
+-gnatj ^ /JUSTIFY_MESSAGES
+-gnatj0 ^ /NO_JUSTIFY_MESSAGES
+-gnatjnn ^ /JUSTIFY_MESSAGES=nn
+-gnatL ^ /INTERSPERSE_SOURCE
+-gnatm ^ /ERROR_LIMIT
+-gnatm2 ^ /ERROR_LIMIT=2
+-gnatn ^ /INLINE=PRAGMA
+-gnatN ^ /INLINE=FULL
+-gnato ^ /CHECKS=OVERFLOW
+-gnatp ^ /CHECKS=SUPPRESS_ALL
+-gnat-p ^ /CHECKS=UNSUPPRESS_ALL
+-gnatP ^ /POLLING
+-gnatR ^ /REPRESENTATION_INFO
+-gnatR0 ^ /REPRESENTATION_INFO=NONE
+-gnatR1 ^ /REPRESENTATION_INFO=ARRAYS
+-gnatR2 ^ /REPRESENTATION_INFO=OBJECTS
+-gnatR3 ^ /REPRESENTATION_INFO=SYMBOLIC
+-gnatq ^ /TRY_SEMANTICS
+-gnatQ ^ /FORCE_ALI
+-gnatr ^ /TREAT_RESTRICTIONS_AS_WARNINGS
+-gnats ^ /SYNTAX_ONLY
+-gnatS ^ /PRINT_STANDARD
+-gnatt ^ /TREE_OUTPUT
+-gnatu ^ /UNITS_LIST
+-gnatU ^ /UNIQUE_ERROR_TAG
+-gnatv ^ /REPORT_ERRORS=VERBOSE
+-gnatV ^ /VALIDITY_CHECKING
+-gnatVa ^ /VALIDITY_CHECKING=ALL
+-gnatVc ^ /VALIDITY_CHECKING=COPIES
+-gnatVd ^ /VALIDITY_CHECKING=DEFAULT
+-gnatVE ^ /VALIDITY_CHECKING=NOCOMPONENTS
+-gnatVe ^ /VALIDITY_CHECKING=COMPONENTS
+-gnatVD ^ /VALIDITY_CHECKING=NODEFAULT
+-gnatVf ^ /VALIDITY_CHECKING=FLOATS
+-gnatVi ^ /VALIDITY_CHECKING=IN_PARAMS
+-gnatVm ^ /VALIDITY_CHECKING=MOD_PARAMS
+-gnatVn ^ /VALIDITY_CHECKING=NONE
+-gnatVo ^ /VALIDITY_CHECKING=OPERANDS
+-gnatVp ^ /VALIDITY_CHECKING=PARAMETERS
+-gnatVr ^ /VALIDITY_CHECKING=RETURNS
+-gnatVs ^ /VALIDITY_CHECKING=SUBSCRIPTS
+-gnatVt ^ /VALIDITY_CHECKING=TESTS
+-gnatw ^ /WARNINGS
+-gnatwa ^ /WARNINGS=OPTIONAL
+-gnatwA ^ /WARNINGS=NOOPTIONAL
+-gnatw.a ^ /WARNINGS=FAILING_ASSERTIONS
+-gnatw.A ^ /WARNINGS=NO_FAILING_ASSERTIONS
+-gnatwb ^ /WARNINGS=BAD_FIXED_VALUES
+-gnatwB ^ /WARNINGS=NO_BAD_FIXED_VALUES
+-gnatw.b ^ /WARNINGS=BIASED_REPRESENTATION
+-gnatw.B ^ /WARNINGS=NO_BIASED_REPRESENTATION
+-gnatwc ^ /WARNINGS=CONDITIONALS
+-gnatwC ^ /WARNINGS=NOCONDITIONALS
+-gnatw.c ^ /WARNINGS=MISSING_COMPONENT_CLAUSES
+-gnatw.C ^ /WARNINGS=NOMISSING_COMPONENT_CLAUSES
+-gnatwd ^ /WARNINGS=IMPLICIT_DEREFERENCE
+-gnatwD ^ /WARNINGS=NOIMPLICIT_DEREFERENCE
+-gnatwe ^ /WARNINGS=ERRORS
+-gnatw.e ^ /WARNINGS=EVERY
+-gnatwf ^ /WARNINGS=UNREFERENCED_FORMALS
+-gnatwF ^ /WARNINGS=NOUNREFERENCED_FORMALS
+-gnatwg ^ /WARNINGS=UNRECOGNIZED_PRAGMAS
+-gnatwG ^ /WARNINGS=NOUNRECOGNIZED_PRAGMAS
+-gnatwh ^ /WARNINGS=HIDING
+-gnatwH ^ /WARNINGS=NOHIDING
+-gnatw.h ^ /WARNINGS=AVOIDGAPS
+-gnatw.H ^ /WARNINGS=NOAVOIDGAPS
+-gnatwi ^ /WARNINGS=IMPLEMENTATION
+-gnatwI ^ /WARNINGS=NOIMPLEMENTATION
+-gnatwj ^ /WARNINGS=OBSOLESCENT
+-gnatwJ ^ /WARNINGS=NOOBSOLESCENT
+-gnatwk ^ /WARNINGS=CONSTANT_VARIABLES
+-gnatwK ^ /WARNINGS=NOCONSTANT_VARIABLES
+-gnatwl ^ /WARNINGS=ELABORATION
+-gnatwL ^ /WARNINGS=NOELABORATION
+-gnatwm ^ /WARNINGS=MODIFIED_UNREF
+-gnatwM ^ /WARNINGS=NOMODIFIED_UNREF
+-gnatw.m ^ /WARNINGS=SUSPICIOUS_MODULUES
+-gnatw.M ^ /WARNINGS=NOSUSPICIOUS_MODULUES
+-gnatwn ^ /WARNINGS=NORMAL
+-gnatwo ^ /WARNINGS=OVERLAYS
+-gnatwO ^ /WARNINGS=NOOVERLAYS
+-gnatw.o ^ /WARNINGS=OUT_PARAM_UNREF
+-gnatw.O ^ /WARNINGS=NOOUT_PARAM_UNREF
+-gnatwp ^ /WARNINGS=INEFFECTIVE_INLINE
+-gnatwP ^ /WARNINGS=NOINEFFECTIVE_INLINE
+-gnatw.p ^ /WARNINGS=PARAMETER_ORDER
+-gnatw.P ^ /WARNINGS=NO_PARAMETER_ORDER
+-gnatw.h ^ /WARNINGS=OVERRIDING_SIZE
+-gnatw.H ^ /WARNINGS=NOOVERRIDING_SIZE
+-gnatwq ^ /WARNINGS=MISSING_PARENS
+-gnatwQ ^ /WARNINGS=NOMISSING_PARENS
+-gnatwr ^ /WARNINGS=REDUNDANT
+-gnatwR ^ /WARNINGS=NOREDUNDANT
+-gnatws ^ /WARNINGS=SUPPRESS
+-gnatwt ^ /WARNINGS=DELETED_CODE
+-gnatwT ^ /WARNINGS=NODELETED_CODE
+-gnatwu ^ /WARNINGS=UNUSED
+-gnatwU ^ /WARNINGS=NOUNUSED
+-gnatw.u ^ /WARNINGS=UNORDERED_ENUMERATIONS
+-gnatw.U ^ /WARNINGS=NOUNORDERED_ENUMERATIONS
+-gnatwv ^ /WARNINGS=VARIABLES_UNINITIALIZED
+-gnatwV ^ /WARNINGS=NOVARIABLES_UNINITIALIZED
+-gnatww ^ /WARNINGS=LOWBOUND_ASSUMED
+-gnatwW ^ /WARNINGS=NOLOWBOUND_ASSUMED
+-gnatw.w ^ /WARNINGS=WARNINGS_OFF_PRAGMAS
+-gnatw.W ^ /WARNINGS=NOWARNINGS_OFF_PRAGMAS
+-gnatwx ^ /WARNINGS=IMPORT_EXPORT_PRAGMAS
+-gnatwX ^ /WARNINGS=NOIMPORT_EXPORT_PRAGMAS
+-gnatw.x ^ /WARNINGS=LOCAL_RAISE_HANDLING
+-gnatw.X ^ /WARNINGS=NOLOCAL_RAISE_HANDLING
+-gnatwy ^ /WARNINGS=ADA_2005_COMPATIBILITY
+-gnatwY ^ /WARNINGS=NOADA_2005_COMPATIBILITY
+-gnatwz ^ /WARNINGS=UNCHECKED_CONVERSIONS
+-gnatwZ ^ /WARNINGS=NOUNCHECKED_CONVERSIONS
+-gnatW8 ^ /WIDE_CHARACTER_ENCODING=UTF8
+-gnatW? ^ /WIDE_CHARACTER_ENCODING=?
+-gnaty ^ /STYLE_CHECKS
+-gnatyO ^ /STYLE_CHECKS=OVERRIDING_INDICATORS
+-gnatyy ^ /STYLE_CHECKS=ALL_BUILTIN
+-gnatZ ^ /ZERO_COST_EXCEPTIONS
+-gnatzc ^ /DISTRIBUTION_STUBS=CALLER
+-gnatzr ^ /DISTRIBUTION_STUBS=RECEIVER
+-gnat83 ^ /83
+-gnat95 ^ /95
+-gnat05 ^ /05
+-gnat2005 ^ /2005
+-gnat12 ^ /12
+-gnat2012 ^ /2012
+-gnatx ^ /XREF=SUPPRESS
+-gnatX ^ /EXTENSIONS_ALLOWED
+--RTS ^ /RUNTIME_SYSTEM
+switch ^ qualifier
+switches ^ qualifiers
+Switch ^ Qualifier
+Switches ^ Qualifiers
+stdout ^ SYS$OUTPUT
+stderr ^ SYS$ERROR
+-bargs ^ /BINDER_QUALIFIERS
+-cargs ^ /COMPILER_QUALIFIERS
+-largs ^ /LINKER_QUALIFIERS
+-margs ^ /MAKE_QUALIFIERS
+-aIDIR ^ /SOURCE_SEARCH=direc
+-aODIR ^ /OBJECT_SEARCH=direc
+-IDIR ^ /SEARCH=direc
+-nostdinc ^ /NOSTD_INCLUDES
+-nostdlib ^ /NOSTD_LIBRARIES
+-pFILE ^ /PROJECT=file
+-O0 ^ /OPTIMIZE=NONE
+-O1 ^ /OPTIMIZE=SOME
+-O2 ^ /OPTIMIZE=ALL
+-O3 ^ /OPTIMIZE=INLINING
+-H32 ^ /32_MALLOC
+-H64 ^ /64_MALLOC
Oops, something went wrong.

0 comments on commit 5e5a843

Please sign in to comment.