From 513bbe9ca27c2c3beaf315df8280586a21cae76a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 17 May 2017 05:53:36 +0200 Subject: Fix typo: paths. --- .gitignore | 2 +- .hgignore | 27 ----- Makefile.in | 2 +- NEWS | 4 +- configure | 8 +- dist/gcc/Make-lang.in | 48 ++++----- dist/windows/mcode/Makefile.in | 22 ++-- dist/windows/mcode/default_pathes.ads | 9 -- dist/windows/mcode/default_paths.ads | 9 ++ src/ghdldrv/Makefile | 193 ---------------------------------- src/ghdldrv/default_pathes.ads.in | 43 -------- src/ghdldrv/default_paths.ads.in | 43 ++++++++ src/ghdldrv/ghdlcomp.adb | 4 +- src/ghdldrv/ghdldrv.adb | 26 ++--- src/ghdldrv/ghdllocal.adb | 16 +-- src/ghdldrv/ghdlvpi.adb | 2 +- src/libraries.adb | 30 +++--- src/libraries.ads | 10 +- src/options.adb | 2 +- src/options.ads | 2 +- src/vhdl/sem_names.adb | 2 +- 21 files changed, 142 insertions(+), 362 deletions(-) delete mode 100644 .hgignore delete mode 100644 dist/windows/mcode/default_pathes.ads create mode 100644 dist/windows/mcode/default_paths.ads delete mode 100644 src/ghdldrv/Makefile delete mode 100644 src/ghdldrv/default_pathes.ads.in create mode 100644 src/ghdldrv/default_paths.ads.in diff --git a/.gitignore b/.gitignore index 60f9fc08d..36718c76b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ lib/ # Generated files on Linux ./Makefile config.status -default_pathes.ads +default_paths.ads elf_arch.ads ghdl.gpr ghdl1-* diff --git a/.hgignore b/.hgignore deleted file mode 100644 index fdc9c18e3..000000000 --- a/.hgignore +++ /dev/null @@ -1,27 +0,0 @@ -syntax:glob -*~* -*.tar.bz2 -*.o -*.ali -*.cf -*.v87 -*.v93 -*.v08 -*.a -*.lst -*.orig -.gdb_history -ortho/oread/oread-gcc -translate/ghdl1-debug -translate/ghdl1-gcc -translate/ghdldrv/default_pathes.ads -translate/ghdldrv/ghdl -translate/ghdldrv/ghdl_gcc -ortho/debug/ortho_debug.ads -translate/grt/grt-files -translate/grt/grt-files.in -translate/grt/run-bind.adb -translate/grt/run-bind.ads -syntax: glob -dist/mcode/lib -dist/mcode/build diff --git a/Makefile.in b/Makefile.in index c748e3d73..5cc0b8008 100644 --- a/Makefile.in +++ b/Makefile.in @@ -450,7 +450,7 @@ clean: force $(RM) -rf lib distclean: clean - $(RM) -f default_pathes.ads ortho_code-x86-flags.ads + $(RM) -f default_paths.ads ortho_code-x86-flags.ads $(RM) -f grt/grt-backtrace-impl.ads $(RM) -f Makefile config.status ghdl.gpr diff --git a/NEWS b/NEWS index 2a0e6d92b..8f1a27f02 100644 --- a/NEWS +++ b/NEWS @@ -253,8 +253,8 @@ New in 0.16 (2005-01-02) * command -r (run) added. New in 0.15 (2004-10-13) -* library file format modified to handle relative pathes. -* install fixed to use relative pathes. +* library file format modified to handle relative paths. +* install fixed to use relative paths. * internal change: ortho API modified (constant are not anymore expressions). New in 0.14 (2004-08-29) diff --git a/configure b/configure index 2bb5ce7c1..042fc1080 100755 --- a/configure +++ b/configure @@ -279,10 +279,10 @@ if test $backend = mcode; then } > elf_arch.ads fi -# Generate default_pathes.ads -# Also update dist/mcode/windows/default_pathes.ads if you change this +# Generate default_paths.ads +# Also update dist/windows/mcode/default_paths.ads if you change this # template. -echo "Generate default_pathes.ads" +echo "Generate default_paths.ads" curdir=`pwd` sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \ -e "s%@COMPILER_DEBUG@%ghdl1-debug$EXEEXT%" \ @@ -293,6 +293,6 @@ sed -e "s%@COMPILER_GCC@%ghdl1-gcc$EXEEXT%" \ -e "s%@LIB_PREFIX@%$libdirsuffix%" \ -e "s%@SOEXT@%$SOEXT%" \ -e "s%@default_pie@%$default_pie%" \ - < $srcdir/src/ghdldrv/default_pathes.ads.in > default_pathes.ads + < $srcdir/src/ghdldrv/default_paths.ads.in > default_paths.ads exit 0 diff --git a/dist/gcc/Make-lang.in b/dist/gcc/Make-lang.in index 690c834b7..ae163d953 100644 --- a/dist/gcc/Make-lang.in +++ b/dist/gcc/Make-lang.in @@ -86,32 +86,32 @@ else VHDL_SOEXT=.so endif -vhdl/default_pathes.ads: Makefile - echo "-- DO NOT EDIT" > tmp-dpathes.ads - echo "-- This file is created by Makefile" >> tmp-dpathes.ads - echo "package Default_Pathes is" >> tmp-dpathes.ads - echo " -- Accept long lines." >> tmp-dpathes.ads - echo " pragma Style_Checks (\"M999\");" >> tmp-dpathes.ads - echo " Install_Prefix : constant String :=" >> tmp-dpathes.ads - echo " \"$(exec_prefix)\";" >> tmp-dpathes.ads +vhdl/default_paths.ads: Makefile + echo "-- DO NOT EDIT" > tmp-dpaths.ads + echo "-- This file is created by Makefile" >> tmp-dpaths.ads + echo "package Default_Paths is" >> tmp-dpaths.ads + echo " -- Accept long lines." >> tmp-dpaths.ads + echo " pragma Style_Checks (\"M999\");" >> tmp-dpaths.ads + echo " Install_Prefix : constant String :=" >> tmp-dpaths.ads + echo " \"$(exec_prefix)\";" >> tmp-dpaths.ads suffix=`expr @"$(libexecdir)" : @"$(prefix)/\(.*\)"`; \ if test x"$$suffix" = x; then suffix="$(libexecdir)"; fi; \ - echo " Compiler_Gcc : constant String :=" >> tmp-dpathes.ads; \ - echo " \"$$suffix/gcc/$(target_noncanonical)/$(version)/ghdl1$(exeext)\";" >> tmp-dpathes.ads - echo " Compiler_Debug : constant String := \"\";" >> tmp-dpathes.ads - echo " Compiler_Mcode : constant String := \"\";" >> tmp-dpathes.ads - echo " Compiler_Llvm : constant String := \"\";" >> tmp-dpathes.ads - echo " Post_Processor : constant String := \"\";" >> tmp-dpathes.ads - echo " Lib_Prefix : constant String :=">> tmp-dpathes.ads - echo " \"lib/ghdl\";" >> tmp-dpathes.ads - echo " Shared_Library_Extension : constant String :=">> tmp-dpathes.ads - echo " \"$(VHDL_SOEXT)\";" >> tmp-dpathes.ads - echo " Default_Pie : constant Boolean := False;" >> tmp-dpathes.ads - echo "end Default_Pathes;" >> tmp-dpathes.ads - $(srcdir)/../move-if-change tmp-dpathes.ads $@ + echo " Compiler_Gcc : constant String :=" >> tmp-dpaths.ads; \ + echo " \"$$suffix/gcc/$(target_noncanonical)/$(version)/ghdl1$(exeext)\";" >> tmp-dpaths.ads + echo " Compiler_Debug : constant String := \"\";" >> tmp-dpaths.ads + echo " Compiler_Mcode : constant String := \"\";" >> tmp-dpaths.ads + echo " Compiler_Llvm : constant String := \"\";" >> tmp-dpaths.ads + echo " Post_Processor : constant String := \"\";" >> tmp-dpaths.ads + echo " Lib_Prefix : constant String :=">> tmp-dpaths.ads + echo " \"lib/ghdl\";" >> tmp-dpaths.ads + echo " Shared_Library_Extension : constant String :=">> tmp-dpaths.ads + echo " \"$(VHDL_SOEXT)\";" >> tmp-dpaths.ads + echo " Default_Pie : constant Boolean := False;" >> tmp-dpaths.ads + echo "end Default_Paths;" >> tmp-dpaths.ads + $(srcdir)/../move-if-change tmp-dpaths.ads $@ # The driver for ghdl. Depends on ghdl1 to use object files in vhdl/ subdir. -ghdl$(exeext): ghdl1$(exeext) vhdl/default_pathes.ads force +ghdl$(exeext): ghdl1$(exeext) vhdl/default_paths.ads force $(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aI$(srcdir)/vhdl/ghdldrv \ -aIvhdl -aOvhdl ghdl_gcc \ -bargs -E -cargs $(ADA_CFLAGS) $(GHDL_ADAFLAGS) -largs $(LIBS) @@ -180,10 +180,10 @@ vhdl.uninstall: vhdl.mostlyclean: -$(RM) vhdl/*$(objext) vhdl/*.ali vhdl/b~*.ad? - -$(RM) vhdl/default_pathes.ads + -$(RM) vhdl/default_paths.ads vhdl.clean: -$(RM) vhdl/*$(objext) - -$(RM) vhdl/default_pathes.ads + -$(RM) vhdl/default_paths.ads vhdl.distclean: -$(RM) vhdl/Makefile -$(RM) ghdl$(exeext) diff --git a/dist/windows/mcode/Makefile.in b/dist/windows/mcode/Makefile.in index beb450a08..be1f11516 100644 --- a/dist/windows/mcode/Makefile.in +++ b/dist/windows/mcode/Makefile.in @@ -13,25 +13,25 @@ GRTSRCDIR=grt ####grt Makefile.inc -ghdl_mcode: default_pathes.ads $(GRT_ADD_OBJS) mmap_binding.o force +ghdl_mcode: default_paths.ads $(GRT_ADD_OBJS) mmap_binding.o force gnatmake -aIghdldrv -aIghdl -aIortho -aIgrt $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs mmap_binding.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(GRT_EXTRA_LIB) -Wl,--version-script=$(GRTSRCDIR)/grt.ver -Wl,--export-dynamic mmap_binding.o: ortho/mmap_binding.c $(CC) -c -g -o $@ $< -default_pathes.ads: Makefile - echo "-- DO NOT EDIT" > tmp-dpathes.ads - echo "-- This file is created by Makefile" >> tmp-dpathes.ads - echo "package Default_Pathes is" >> tmp-dpathes.ads - echo " Prefix : constant String :=">> tmp-dpathes.ads - echo " \"$(PREFIX)/lib/ghdl/\";" >> tmp-dpathes.ads - echo "end Default_Pathes;" >> tmp-dpathes.ads - if test -r $@ && cmp tmp-dpathes.ads $@; then \ +default_paths.ads: Makefile + echo "-- DO NOT EDIT" > tmp-dpaths.ads + echo "-- This file is created by Makefile" >> tmp-dpaths.ads + echo "package Default_Paths is" >> tmp-dpaths.ads + echo " Prefix : constant String :=">> tmp-dpaths.ads + echo " \"$(PREFIX)/lib/ghdl/\";" >> tmp-dpaths.ads + echo "end Default_Paths;" >> tmp-dpaths.ads + if test -r $@ && cmp tmp-dpaths.ads $@; then \ echo "$@ unchanged"; \ else \ - mv tmp-dpathes.ads $@; \ + mv tmp-dpaths.ads $@; \ fi - $(RM) tmp-dpathes.ads + $(RM) tmp-dpaths.ads force: diff --git a/dist/windows/mcode/default_pathes.ads b/dist/windows/mcode/default_pathes.ads deleted file mode 100644 index d83addbe2..000000000 --- a/dist/windows/mcode/default_pathes.ads +++ /dev/null @@ -1,9 +0,0 @@ -with Windows_Default_Path; -pragma Elaborate_All (Windows_Default_Path); - -package Default_Pathes is - Install_Prefix : constant String := - Windows_Default_Path.Get_Windows_Exec_Path; - Lib_Prefix : constant String := "lib"; - Shared_Library_Extension : constant String := ".dll"; -end Default_Pathes; diff --git a/dist/windows/mcode/default_paths.ads b/dist/windows/mcode/default_paths.ads new file mode 100644 index 000000000..6b1d9d952 --- /dev/null +++ b/dist/windows/mcode/default_paths.ads @@ -0,0 +1,9 @@ +with Windows_Default_Path; +pragma Elaborate_All (Windows_Default_Path); + +package Default_Paths is + Install_Prefix : constant String := + Windows_Default_Path.Get_Windows_Exec_Path; + Lib_Prefix : constant String := "lib"; + Shared_Library_Extension : constant String := ".dll"; +end Default_Paths; diff --git a/src/ghdldrv/Makefile b/src/ghdldrv/Makefile deleted file mode 100644 index b900fca39..000000000 --- a/src/ghdldrv/Makefile +++ /dev/null @@ -1,193 +0,0 @@ -# -*- Makefile -*- for the GHDL drivers. -# Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold -# -# GHDL is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation; either version 2, or (at your option) any later -# version. -# -# GHDL is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING. If not, write to the Free -# Software Foundation, 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -GNATFLAGS=-gnaty3befhkmr -gnata -gnatwael -aI../.. -aI.. -aI../../psl -aI../grt -aO.. -g -gnatf -gnat05 -GRT_FLAGS=-g -LIB_CFLAGS=-g -O2 -GNATMAKE=gnatmake -CC=gcc - -# Optimize, do not forget to use MODE=--genfast for iirs.adb. -#GNATFLAGS+=-O -gnatn -#GRT_FLAGS+=-O - -# Profiling. -#GNATFLAGS+=-pg -gnatn -O -#GRT_FLAGS+=-pg -O - -# Coverage -#GNATFLAGS+=-fprofile-arcs -ftest-coverage - -GNAT_BARGS=-bargs -E - -LLVM_CONFIG=llvm-config - -#GNAT_LARGS= -static -all: ghdl_mcode$(EXEEXT) - -target=i686-pc-linux-gnu -#target=x86_64-pc-linux-gnu -#target=i686-apple-darwin -#target=x86_64-apple-darwin -#target=i386-pc-mingw32 -GRTSRCDIR=../grt -include $(GRTSRCDIR)/Makefile.inc - -ifeq ($(filter-out i%86 linux,$(arch) $(osys)),) - ORTHO_X86_FLAGS=Flags_Linux -endif -ifeq ($(filter-out i%86 darwin%,$(arch) $(osys)),) - ORTHO_X86_FLAGS=Flags_Macosx -endif -ifeq ($(filter-out i%86 mingw32%,$(arch) $(osys)),) - ORTHO_X86_FLAGS=Flags_Windows -endif -ifdef ORTHO_X86_FLAGS - ORTHO_DEPS=ortho_code-x86-flags.ads -endif - -ortho_code-x86-flags.ads: - echo "with Ortho_Code.X86.$(ORTHO_X86_FLAGS);" > $@ - echo "package Ortho_Code.X86.Flags renames Ortho_Code.X86.$(ORTHO_X86_FLAGS);" >> $@ - -ghdl_mcode$(EXEEXT): GRT_FLAGS+=-DWITH_GNAT_RUN_TIME -ghdl_mcode$(EXEEXT): default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) memsegs_c.o chkstk.o force - $(GNATMAKE) -o $@ -aI../../ortho/mcode -aI../../ortho $(GNATFLAGS) ghdl_jit.adb $(GNAT_BARGS) -largs memsegs_c.o chkstk.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) - -memsegs_c.o: ../../ortho/mcode/memsegs_c.c - $(CC) -c -g -o $@ $< - -ghdl_llvm_jit$(EXEEXT): GRT_FLAGS+=-DWITH_GNAT_RUN_TIME -ghdl_llvm_jit$(EXEEXT): default_pathes.ads $(GRT_ADD_OBJS) $(ORTHO_DEPS) llvm-cbindings.o force - $(GNATMAKE) -o $@ -aI../../ortho/llvm -aI../../ortho $(GNATFLAGS) ghdl_jit.adb $(GNAT_BARGS) -largs llvm-cbindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++ - -llvm-cbindings.o: ../../ortho/llvm/llvm-cbindings.cpp - $(CXX) -c -m64 `$(LLVM_CONFIG) --includedir --cxxflags` -g -o $@ $< - -ghdl_simul$(EXEEXT): default_pathes.ads $(GRT_ADD_OBJS) force - $(GNATMAKE) -aI../../simulate $(GNATFLAGS) ghdl_simul$(EXEEXT) $(GNAT_BARGS) -largs $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) - -ghdl_gcc$(EXEEXT): default_pathes.ads force - $(GNATMAKE) $(GNATFLAGS) ghdl_gcc $(GNAT_BARGS) -largs $(GNAT_LARGS) - -ghdl_llvm$(EXEEXT): default_pathes.ads force - $(GNATMAKE) $(GNATFLAGS) ghdl_llvm $(GNAT_BARGS) -largs $(GNAT_LARGS) - -default_pathes.ads: default_pathes.ads.in Makefile - curdir=`cd ..; pwd`; \ - sed -e "s%@COMPILER_GCC@%$$curdir/ghdl1-gcc$(EXEEXT)%" \ - -e "s%@COMPILER_DEBUG@%$$curdir/ghdl1-debug$(EXEEXT)%" \ - -e "s%@COMPILER_MCODE@%$$curdir/ghdl1-mcode$(EXEEXT)%" \ - -e "s%@COMPILER_LLVM@%$$curdir/ghdl1-llvm$(EXEEXT)%" \ - -e "s%@POST_PROCESSOR@%$$curdir/../ortho/oread/oread-gcc$(EXEEXT)%" \ - -e "s%@INSTALL_PREFIX@%%" \ - -e "s%@LIB_PREFIX@%$$curdir/lib/%" < $< > $@ - -bootstrap.old: force - $(RM) ../../libraries/std-obj87.cf - $(MAKE) -C ../../libraries EXT=obj \ - ANALYSE="$(PWD)/ghdl$(EXEEXT) -a -g" std-obj87.cf - $(RM) ../../libraries/std-obj93.cf - $(MAKE) -C ../../libraries EXT=obj \ - ANALYSE="$(PWD)/ghdl$(EXEEXT) -a -g" std-obj93.cf - -LIB87_DIR:=../lib/v87 -LIB93_DIR:=../lib/v93 -LIB08_DIR:=../lib/v08 - -LIBSRC_DIR:=../../libraries -REL_DIR:=../.. -GHDL=ghdl$(EXEEXT) -ANALYZE:=../../../ghdldrv/$(GHDL) -a $(LIB_CFLAGS) -LN=ln -s -CP=cp - -$(LIB87_DIR) $(LIB93_DIR) $(LIB08_DIR): - [ -d ../lib ] || mkdir ../lib - [ -d $@ ] || mkdir $@ - -include ../../libraries/Makefile.inc - -GHDL1=../ghdl1-gcc$(EXEEXT) -$(LIB93_DIR)/std/std_standard.o: $(GHDL1) -ifeq ($(GHDL),ghdl_llvm$(EXEEXT)) - $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard -else - $(GHDL1) --std=93 -quiet $(LIB_CFLAGS) -o std_standard.s \ - --compile-standard - $(CC) -c -o $@ std_standard.s - $(RM) std_standard.s -endif - -$(LIB87_DIR)/std/std_standard.o: $(GHDL1) -ifeq ($(GHDL),ghdl_llvm$(EXEEXT)) - $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard -else - $(GHDL1) --std=87 -quiet $(LIB_CFLAGS) -o std_standard.s \ - --compile-standard - $(CC) -c -o $@ std_standard.s - $(RM) std_standard.s -endif - -$(LIB08_DIR)/std/std_standard.o: $(GHDL1) -ifeq ($(GHDL),ghdl_llvm$(EXEEXT)) - $(GHDL1) --std=08 -quiet $(LIB_CFLAGS) -c -o $@ --compile-standard -else - $(GHDL1) --std=08 -quiet $(LIB_CFLAGS) -o std_standard.s \ - --compile-standard - $(CC) -c -o $@ std_standard.s - $(RM) std_standard.s -endif - -install.v93: std.v93 ieee.v93 synopsys.v93 mentor.v93 -install.v87: std.v87 ieee.v87 synopsys.v87 -install.v08: std.v08 ieee.v08 - -install.standard: $(LIB93_DIR)/std/std_standard.o \ - $(LIB87_DIR)/std/std_standard.o \ - $(LIB08_DIR)/std/std_standard.o - -grt.links: - cd ../lib; ln -sf $(GRTSRCDIR)/grt.lst .; ln -sf $(GRTSRCDIR)/libgrt.a .; ln -sf $(GRTSRCDIR)/grt.ver . - -install.all: install.v87 install.v93 install.v08 - -install.gcc: - $(MAKE) GHDL=ghdl_gcc$(EXEEXT) install.all - $(MAKE) GHDL1=../ghdl1-gcc$(EXEEXT) install.standard - -install.mcode: - $(MAKE) GHDL=ghdl_mcode$(EXEEXT) install.all - -install.simul: - $(MAKE) GHDL=ghdl_simul$(EXEEXT) install.all - -install.llvm: - $(MAKE) GHDL=ghdl_llvm$(EXEEXT) install.all - $(MAKE) GHDL1=../ghdl1-llvm$(EXEEXT) install.standard - -clean: force - $(RM) -f *.o *.ali ghdl_gcc$(EXEEXT) ghdl_mcode$(EXEEXT) ghdl_llvm$(EXEEXT) ghdl_llvm_jit$(EXEEXT) - $(RM) -f b~*.ad? *~ default_pathes.ads ghdl_simul$(EXEEXT) - $(RM) -rf ../lib - -clean-c: force - $(RM) -f memsegs_c.o chkstk.o linux.o times.o grt-cbinding.o grt-cvpi.o - -force: - -.PHONY: force clean diff --git a/src/ghdldrv/default_pathes.ads.in b/src/ghdldrv/default_pathes.ads.in deleted file mode 100644 index 8b0801e13..000000000 --- a/src/ghdldrv/default_pathes.ads.in +++ /dev/null @@ -1,43 +0,0 @@ --- GHDL driver pathes -*- ada -*-. --- Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold --- --- GHDL is free software; you can redistribute it and/or modify it under --- the terms of the GNU General Public License as published by the Free --- Software Foundation; either version 2, or (at your option) any later --- version. --- --- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or --- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --- for more details. --- --- You should have received a copy of the GNU General Public License --- along with GCC; see the file COPYING. If not, write to the Free --- Software Foundation, 59 Temple Place - Suite 330, Boston, MA --- 02111-1307, USA. - -package Default_Pathes is - - -- Accept long lines. - pragma Style_Checks ("M999"); - - Install_Prefix : constant String := - "@INSTALL_PREFIX@"; - Lib_Prefix : constant String := - "@LIB_PREFIX@"; - - Compiler_Gcc : constant String := - "@COMPILER_GCC@"; - Compiler_Mcode : constant String := - "@COMPILER_MCODE@"; - Compiler_Llvm : constant String := - "@COMPILER_LLVM@"; - Compiler_Debug : constant String := - "@COMPILER_DEBUG@"; - Post_Processor : constant String := - "@POST_PROCESSOR@"; - - Shared_Library_Extension : constant String := - "@SOEXT@"; - Default_Pie : constant Boolean := "@default_pie@" = String'("yes"); -end Default_Pathes; diff --git a/src/ghdldrv/default_paths.ads.in b/src/ghdldrv/default_paths.ads.in new file mode 100644 index 000000000..da2f7cc42 --- /dev/null +++ b/src/ghdldrv/default_paths.ads.in @@ -0,0 +1,43 @@ +-- GHDL driver paths -*- ada -*-. +-- Copyright (C) 2002, 2003, 2004, 2005 Tristan Gingold +-- +-- GHDL is free software; you can redistribute it and/or modify it under +-- the terms of the GNU General Public License as published by the Free +-- Software Foundation; either version 2, or (at your option) any later +-- version. +-- +-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or +-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +-- for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with GCC; see the file COPYING. If not, write to the Free +-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA +-- 02111-1307, USA. + +package Default_Paths is + + -- Accept long lines. + pragma Style_Checks ("M999"); + + Install_Prefix : constant String := + "@INSTALL_PREFIX@"; + Lib_Prefix : constant String := + "@LIB_PREFIX@"; + + Compiler_Gcc : constant String := + "@COMPILER_GCC@"; + Compiler_Mcode : constant String := + "@COMPILER_MCODE@"; + Compiler_Llvm : constant String := + "@COMPILER_LLVM@"; + Compiler_Debug : constant String := + "@COMPILER_DEBUG@"; + Post_Processor : constant String := + "@POST_PROCESSOR@"; + + Shared_Library_Extension : constant String := + "@SOEXT@"; + Default_Pie : constant Boolean := "@default_pie@" = String'("yes"); +end Default_Paths; diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index 49674b927..19f76c7ed 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -496,8 +496,8 @@ package body Ghdlcomp is begin Disp_Config_Prefixes; - Put_Line ("default library pathes:"); - for I in 2 .. Get_Nbr_Pathes loop + Put_Line ("default library paths:"); + for I in 2 .. Get_Nbr_Paths loop Put (' '); Put_Line (Name_Table.Image (Get_Path (I))); end loop; diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index ae8e510f3..d9761970c 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -28,7 +28,7 @@ with Types; use Types; with Iirs; use Iirs; with Files_Map; with Configuration; -with Default_Pathes; +with Default_Paths; with Interfaces.C_Streams; with System; with Ghdlmain; use Ghdlmain; @@ -196,7 +196,7 @@ package body Ghdldrv is -- Add -fpic for gcc/llvm. if not Flag_Postprocess - and then Default_Pathes.Default_Pie + and then Default_Paths.Default_Pie then case Backend is when Backend_Gcc @@ -432,20 +432,20 @@ package body Ghdldrv is -- Set tools name. if Compiler_Cmd = null then if Flag_Postprocess then - Compiler_Cmd := new String'(Default_Pathes.Compiler_Debug); + Compiler_Cmd := new String'(Default_Paths.Compiler_Debug); else case Backend is when Backend_Gcc => - Compiler_Cmd := new String'(Default_Pathes.Compiler_Gcc); + Compiler_Cmd := new String'(Default_Paths.Compiler_Gcc); when Backend_Mcode => - Compiler_Cmd := new String'(Default_Pathes.Compiler_Mcode); + Compiler_Cmd := new String'(Default_Paths.Compiler_Mcode); when Backend_Llvm => - Compiler_Cmd := new String'(Default_Pathes.Compiler_Llvm); + Compiler_Cmd := new String'(Default_Paths.Compiler_Llvm); end case; end if; end if; if Post_Processor_Cmd = null then - Post_Processor_Cmd := new String'(Default_Pathes.Post_Processor); + Post_Processor_Cmd := new String'(Default_Paths.Post_Processor); end if; if Assembler_Cmd = null then Assembler_Cmd := new String'("as"); @@ -477,7 +477,7 @@ package body Ghdldrv is -- Try configured prefix declare Path : constant String := - Default_Pathes.Install_Prefix & Directory_Separator & Toolname; + Default_Paths.Install_Prefix & Directory_Separator & Toolname; begin if Is_Executable_File (Path) then return new String'(Path); @@ -535,7 +535,7 @@ package body Ghdldrv is Set_Tools_Name; Setup_Libraries (Load); Locate_Tools; - for I in 2 .. Get_Nbr_Pathes loop + for I in 2 .. Get_Nbr_Paths loop Add_Argument (Compiler_Args, new String'("-P" & Image (Get_Path (I)))); end loop; @@ -726,7 +726,7 @@ package body Ghdldrv is end if; Set_Tools_Name; - Put_Line ("Pathes at configuration:"); + Put_Line ("Paths at configuration:"); Put ("compiler command: "); Put_Line (Compiler_Cmd.all); if Flag_Postprocess then @@ -743,7 +743,7 @@ package body Ghdldrv is end case; Put ("linker command: "); Put_Line (Linker_Cmd.all); - Put_Line ("default lib prefix: " & Default_Pathes.Lib_Prefix); + Put_Line ("default lib prefix: " & Default_Paths.Lib_Prefix); New_Line; @@ -769,8 +769,8 @@ package body Ghdldrv is New_Line; - Put_Line ("default library pathes:"); - for I in 2 .. Get_Nbr_Pathes loop + Put_Line ("default library paths:"); + for I in 2 .. Get_Nbr_Paths loop Put (' '); Put_Line (Image (Get_Path (I))); end loop; diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index 229108e5a..81c3adb05 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -25,7 +25,7 @@ with Flags; with Name_Table; with Std_Names; with Disp_Vhdl; -with Default_Pathes; +with Default_Paths; with Scanner; with Errorout; with Configuration; @@ -34,7 +34,7 @@ with Options; with Iirs_Utils; use Iirs_Utils; package body Ghdllocal is - -- Version of the IEEE library to use. This just change pathes. + -- Version of the IEEE library to use. This just change paths. type Ieee_Lib_Kind is (Lib_Standard, Lib_None, Lib_Synopsys, Lib_Mentor); Flag_Ieee : Ieee_Lib_Kind; @@ -349,22 +349,22 @@ package body Ghdllocal is end if; -- Else try default path. if Lib_Prefix_Path = null then - if Is_Absolute_Path (Default_Pathes.Lib_Prefix) then - Lib_Prefix_Path := new String'(Default_Pathes.Lib_Prefix); + if Is_Absolute_Path (Default_Paths.Lib_Prefix) then + Lib_Prefix_Path := new String'(Default_Paths.Lib_Prefix); else if Exec_Prefix /= null then Lib_Prefix_Path := new String'(Exec_Prefix.all & Directory_Separator - & Default_Pathes.Lib_Prefix); + & Default_Paths.Lib_Prefix); end if; if Lib_Prefix_Path = null or else not Is_Directory (Lib_Prefix_Path.all) then Free (Lib_Prefix_Path); Lib_Prefix_Path := new - String'(Default_Pathes.Install_Prefix + String'(Default_Paths.Install_Prefix & Directory_Separator - & Default_Pathes.Lib_Prefix); + & Default_Paths.Lib_Prefix); end if; end if; else @@ -372,7 +372,7 @@ package body Ghdllocal is Flag_32bit := False; end if; - -- Add pathes for predefined libraries. + -- Add paths for predefined libraries. if not Flags.Bootstrap then Add_Library_Path ("std"); case Flag_Ieee is diff --git a/src/ghdldrv/ghdlvpi.adb b/src/ghdldrv/ghdlvpi.adb index 6cdc3a619..f05761da6 100644 --- a/src/ghdldrv/ghdlvpi.adb +++ b/src/ghdldrv/ghdlvpi.adb @@ -21,7 +21,7 @@ with GNAT.OS_Lib; use GNAT.OS_Lib; with Ada.Command_Line; use Ada.Command_Line; with Ghdlmain; use Ghdlmain; with Ghdllocal; -with Default_Pathes; use Default_Pathes; +with Default_Paths; use Default_Paths; package body Ghdlvpi is diff --git a/src/libraries.adb b/src/libraries.adb index 1dfd8dea9..01bf46faf 100644 --- a/src/libraries.adb +++ b/src/libraries.adb @@ -45,8 +45,8 @@ package body Libraries is -- A location for any implicit declarations (such as library WORK). Implicit_Location: Location_Type; - -- Table of library pathes. - package Pathes is new Tables + -- Table of library paths. + package Paths is new Tables (Table_Index_Type => Integer, Table_Component_Type => Name_Id, Table_Low_Bound => 1, @@ -63,18 +63,18 @@ package body Libraries is Report_Msg (Msgid_Error, Library, No_Location, Msg, (1 => Arg1)); end Error_Lib_Msg; - -- Initialize pathes table. + -- Initialize paths table. -- Set the local path. - procedure Init_Pathes + procedure Init_Paths is begin -- Always look in current directory first. Name_Nil := Get_Identifier (""); - Pathes.Append (Name_Nil); + Paths.Append (Name_Nil); Local_Directory := Name_Nil; Work_Directory := Name_Nil; - end Init_Pathes; + end Init_Paths; function Path_To_Id (Path : String) return Name_Id is begin @@ -96,21 +96,21 @@ package body Libraries is Error_Lib_Msg ("argument of -P is too long"); return; end if; - Pathes.Append (Path_To_Id (Path)); + Paths.Append (Path_To_Id (Path)); end Add_Library_Path; - function Get_Nbr_Pathes return Natural is + function Get_Nbr_Paths return Natural is begin - return Pathes.Last; - end Get_Nbr_Pathes; + return Paths.Last; + end Get_Nbr_Paths; function Get_Path (N : Natural) return Name_Id is begin - if N not in Pathes.First .. Pathes.Last then + if N not in Paths.First .. Paths.Last then raise Constraint_Error; end if; - return Pathes.Table (N); + return Paths.Table (N); end Get_Path; -- Transform a library identifier into a file name. @@ -141,8 +141,8 @@ package body Libraries is L : Natural; Path_Len : Natural; begin - for I in Pathes.First .. Pathes.Last loop - Image (Pathes.Table (I)); + for I in Paths.First .. Paths.Last loop + Image (Paths.Table (I)); Path_Len := Nam_Length; -- Try PATH/LIBxxx.cf @@ -150,7 +150,7 @@ package body Libraries is Nam_Buffer (Path_Len + 1 .. L) := File_Name; Nam_Buffer (L + 1) := Character'Val (0); if GNAT.OS_Lib.Is_Regular_File (Nam_Buffer'Address) then - Set_Library_Directory (Library, Pathes.Table (I)); + Set_Library_Directory (Library, Paths.Table (I)); exit; end if; diff --git a/src/libraries.ads b/src/libraries.ads index 0a7e04674..2d1483833 100644 --- a/src/libraries.ads +++ b/src/libraries.ads @@ -49,7 +49,7 @@ package Libraries is Work_Library_Name : Name_Id := Std_Names.Name_Work; -- Directory of the work library. - -- Set by default by INIT_PATHES to the local directory. + -- Set by default by INIT_PATHS to the local directory. Work_Directory : Name_Id; -- Local (current) directory. @@ -62,15 +62,15 @@ package Libraries is -- Chain of obsoleted design units. Obsoleted_Design_Units : Iir := Null_Iir; - -- Initialize library pathes table. + -- Initialize library paths table. -- Set the local path. - procedure Init_Pathes; + procedure Init_Paths; -- Add PATH in the search path. procedure Add_Library_Path (Path : String); - -- Get the number of path in the search pathes. - function Get_Nbr_Pathes return Natural; + -- Get the number of path in the search paths. + function Get_Nbr_Paths return Natural; -- Get path N. function Get_Path (N : Natural) return Name_Id; diff --git a/src/options.adb b/src/options.adb index 03e1810b7..224560f88 100644 --- a/src/options.adb +++ b/src/options.adb @@ -32,7 +32,7 @@ package body Options is procedure Initialize is begin Std_Names.Std_Names_Initialize; - Libraries.Init_Pathes; + Libraries.Init_Paths; PSL.Nodes.Init; PSL.Dump_Tree.Dump_Hdl_Node := Disp_Tree.Disp_Tree_For_Psl'Access; end Initialize; diff --git a/src/options.ads b/src/options.ads index b8a7f9f16..0567cc200 100644 --- a/src/options.ads +++ b/src/options.ads @@ -18,7 +18,7 @@ package Options is -- Return true if opt is recognize by flags. - -- Note: std_names.std_names_initialize and files_map.init_pathes must have + -- Note: std_names.std_names_initialize and files_map.init_paths must have -- been called before this subprogram. function Parse_Option (Option : String) return Boolean; diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 7c58d4fe7..9b1c22050 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -1835,7 +1835,7 @@ package body Sem_Names is Res_List := Create_Iir_List; N := 0; -- The SEEN_FLAG is used to get only one meaning which can be reached - -- through several pathes (such as aliases). + -- through several paths (such as aliases). while Valid_Interpretation (Interpretation) loop if Keep_Alias then Res := Get_Declaration (Interpretation); -- cgit v1.2.3