diff options
author | Tristan Gingold | 2014-11-17 22:03:44 +0100 |
---|---|---|
committer | Tristan Gingold | 2014-11-17 22:03:44 +0100 |
commit | 0d57b5eca852274c47df8dbce01dd5ffb6344edb (patch) | |
tree | 7a6b6997b9b6ef0a52d0a19894d3cd46afa97518 /dist/gcc/Make-lang.in | |
parent | b2e45450d8a1b96078753094b992ad8f5204474b (diff) | |
download | ghdl-0d57b5eca852274c47df8dbce01dd5ffb6344edb.tar.gz ghdl-0d57b5eca852274c47df8dbce01dd5ffb6344edb.tar.bz2 ghdl-0d57b5eca852274c47df8dbce01dd5ffb6344edb.zip |
Fix dist/gcc makefiles
Diffstat (limited to 'dist/gcc/Make-lang.in')
-rw-r--r-- | dist/gcc/Make-lang.in | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/dist/gcc/Make-lang.in b/dist/gcc/Make-lang.in index cde3e6c..fea35ef 100644 --- a/dist/gcc/Make-lang.in +++ b/dist/gcc/Make-lang.in @@ -73,27 +73,54 @@ GHDL1_OBJS = attribs.o vhdl/ortho-lang.o # before. vhdl_OBJS=vhdl/ortho-lang.o +vhdl_srcdir := $(shell cd $(srcdir)/vhdl; pwd) + # The compiler proper. # It is compiled into the vhdl/ subdirectory to avoid file name clashes but # linked in in gcc directory to be able to access to gcc object files. ghdl1$(exeext): force $(GHDL1_OBJS) $(BACKEND) $(LIBDEPS) - CURDIR=`pwd`; cd $(srcdir)/vhdl; VHDLSRCDIR=`pwd`; cd $$CURDIR/vhdl; \ - $(GNATMAKE) -c -aI$$VHDLSRCDIR ortho_gcc-main \ + # Create object file in vhdl/subdir + cd vhdl; $(GNATMAKE) -c -aI$(vhdl_srcdir) ortho_gcc-main \ -cargs $(CFLAGS) $(GHDL_ADAFLAGS) $(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \ -bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \ -largs --LINK=$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GHDL1_OBJS) \ $(filter-out main.o,$(BACKEND)) $(LIBS) $(BACKENDLIBS) -# The driver for ghdl. -ghdl$(exeext): force - $(MAKE_IN_VHDL) ../ghdl$(exeext) +vhdl/default_pathes.ads: + 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 + echo " Compiler_Gcc : constant String :=" >> tmp-dpathes.ads + echo " \"libexec/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/gcc/$(target_noncanonical)/$(version)/vhdl/lib/\";" >> tmp-dpathes.ads + echo "end Default_Pathes;" >> tmp-dpathes.ads + $(srcdir)/../move-if-change tmp-dpathes.ads $@ + +# The driver for ghdl. Depends on ghdl1 to use object files in vhdl/ subdir. +ghdl$(exeext): ghdl1$(exeext) vhdl/default_pathes.ads force + $(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aI$(srcdir)/vhdl/ghdldrv \ + -aIvhdl -aOvhdl ghdl_gcc \ + -bargs -E -cargs $(ADA_CFLAGS) $(GHDL_ADAFLAGS) -largs $(LIBS) # Ghdl libraries. -ghdllib: ghdl$(exeext) ghdl1$(exeext) $(GCC_PASSES) force +ghdllib: ghdl$(exeext) ghdl1$(exeext) $(GCC_PASSES) vhdl/Makefile force $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" $(FLAGS_TO_PASS) \ ADAC=$(COMPILER_FOR_BUILD) ghdllib +vhdl/Makefile: config.status $(srcdir)/vhdl/Makefile.in + CONFIG_HEADERS= CONFIG_LINKS= CONFIG_COMMANDS= \ + CONFIG_FILES=vhdl/Makefile $(SHELL) config.status + # Build hooks: vhdl.all.build: @@ -129,7 +156,7 @@ vhdl.install-normal: vhdl.install-plugin: # Install the driver program as ghdl. -vhdl.install-common: ghdl$(exeext) +vhdl.install-common: ghdl$(exeext) vhdl/Makefile -mkdir $(DESTDIR)$(bindir) -$(RM) $(DESTDIR)$(bindir)/ghdl$(exeext) $(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl$(exeext) @@ -138,10 +165,7 @@ vhdl.install-common: ghdl$(exeext) install-info:: $(DESTDIR)$(infodir)/ghdl.info -vhdl.install-info: doc/ghdl.info - -rm -rf $(infodir)/ghdl.info* - $(INSTALL_DATA) doc/ghdl.info* $(DESTDIR)$(infodir) - -chmod a-x $(DESTDIR)$(infodir)/ghdl.info* +vhdl.install-info: $(DESTDIR)$(infodir)/ghdl.info install-ghdllib: $(MAKE) -f vhdl/Makefile $(FLAGS_TO_PASS) $(VHDL_FLAGS_TO_PASS) install-ghdllib @@ -162,9 +186,11 @@ vhdl.uninstall: # We just have to delete files specific to us. vhdl.mostlyclean: - -$(RM) vhdl/*$(objext) vhdl/*.ali vhdl/b_*.c + -$(RM) vhdl/*$(objext) vhdl/*.ali vhdl/b~*.ad? + -$(RM) vhdl/default_pathes.ads vhdl.clean: -$(RM) vhdl/*$(objext) + -$(RM) vhdl/default_pathes.ads vhdl.distclean: -$(RM) vhdl/Makefile -$(RM) ghdl$(exeext) |