Hi, This patch fixes the install process for gpc-19990118. If you do a ``make LANGUAGES=c; make LANGUAGES=c install'' from a source tree which includes gpc, the following files are built and installed: ${prefix}/doc/gpc/demos/* ${prefix}/info/gpc.info* ${prefix}/lib/gcc-lib/.../gpc-cpp ${prefix}/lib/gcc-lib/.../units/* The patch fixes this problem (and corrects a typo in gpc/p/units/crt.pas.) diff -urN gpc.orig/p/Make-lang.in gpc/p/Make-lang.in --- gpc.orig/p/Make-lang.in Mon Jan 18 18:10:16 1999 +++ gpc/p/Make-lang.in Sun Feb 14 07:14:49 1999 @@ -226,11 +226,13 @@ cd p; $(MAKE) $(FLAGS_TO_PASS) $(GPC_FLAGS_TO_PASS) ../gpc1$(exeext) gpc-cpp$(exeext): $(P) mbchar.o cexp.o $(srcdir)/p/gpc-cccp.c $(srcdir)/p/version.c - cd p; $(MAKE) $(FLAGS_TO_PASS) $(GPC_FLAGS_TO_PASS) ../gpc-cpp$(exeext) + case "$(LANGUAGES)" in \ + *[Pp]ascal*) cd p; $(MAKE) $(FLAGS_TO_PASS) $(GPC_FLAGS_TO_PASS) ../gpc-cpp$(exeext) ;; \ + *) ;; esac pascal.rts: p/rts/Makefile case "$(LANGUAGES)" in \ - *pascal*) cd p/rts && $(MAKE) \ + *[Pp]ascal*) cd p/rts && $(MAKE) \ GCC_FOR_TARGET="`case '$(GCC_FOR_TARGET)' in \ './xgcc -B./'*) echo ../../xgcc -B../../;; \ *) echo '$(GCC_FOR_TARGET)';; esac`" \ @@ -249,7 +251,8 @@ # mk: but it needs $(EXTRA_OBJS) and $(LIBGCC), what to do? p/rts/Makefile: $(srcdir)/p/rts/Makefile.in $(srcdir)/p/rts/configure \ $(GCC_PARTS) stmp-headers - if [ -d p/rts ]; then true; else mkdir p/rts; fi + case "$(LANGUAGES)" in \ + *[Pp]ascal*) if [ -d p/rts ]; then true; else mkdir p/rts; fi; \ src=`cd $(srcdir); pwd`; \ cd p/rts; \ CC="`case '$(GCC_FOR_TARGET)' in \ @@ -259,7 +262,8 @@ './xgpc -B./'*) echo ../../xgpc -B../../;; \ *) echo '$(GPC_FOR_TARGET)';; esac`" \ $(RTS_FLAGS_TO_PASS) CONFIG_SITE=nonexisting-file $(SHELL) \ - $${src}/p/rts/configure --srcdir=$${src}/p/rts + $${src}/p/rts/configure --srcdir=$${src}/p/rts ;; \ + *) ;; esac # Derive parts of the documentation of the run time library directly # from the source. @@ -300,8 +304,10 @@ pascal.install-normal: install-gpc-cpp install-libgpc pascal.install-units pascal.install-demos install-gpc-cpp: gpc-cpp$(exeext) - -rm -f $(libsubdir)/gpc-cpp$(exeext) - $(INSTALL_PROGRAM) gpc-cpp$(exeext) $(libsubdir)/gpc-cpp$(exeext) + case "$(LANGUAGES)" in \ + *[Pp]ascal*) rm -f $(libsubdir)/gpc-cpp$(exeext); \ + $(INSTALL_PROGRAM) gpc-cpp$(exeext) $(libsubdir)/gpc-cpp$(exeext) ;; \ + *) ;; esac install-libgpc: pascal.install-dir pascal.rts -if [ -f libgpc.a ] ; then \ @@ -313,13 +319,16 @@ else true; fi $(srcdir)/p/units/crtc.h: $(srcdir)/p/units/crt.inc - (echo '/* Automatically generated from crt.inc'; \ + case "$(LANGUAGES)" in \ + *[Pp]ascal*) (echo '/* Automatically generated from crt.inc'; \ echo ' DO NOT CHANGE THIS FILE MANUALLY! */'; \ sed -e '1,/^const/d;s/^\([^=]*\)= #\?\([^;]*\);\(.*;\)\?$$/#define \1 \2/' \ - -e '/^.\$$/d' < $(srcdir)/p/units/crt.inc) > $(srcdir)/p/units//crtc.h + -e '/^.\$$/d' < $(srcdir)/p/units/crt.inc) > $(srcdir)/p/units//crtc.h ;; \ + *) ;; esac pascal.install-units: pascal.install-dir $(srcdir)/p/units/crtc.h - $(INSTALL_DATA) $(srcdir)/p/rts/gpc.pas $(unitsubdir)/gpc.pas; \ + case "$(LANGUAGES)" in \ + *[Pp]ascal*) $(INSTALL_DATA) $(srcdir)/p/rts/gpc.pas $(unitsubdir)/gpc.pas; \ chmod a-x $(unitsubdir)/gpc.pas; \ $(INSTALL_DATA) $(srcdir)/p/rts/internal.pas $(unitsubdir)/internal.pas; \ chmod a-x $(unitsubdir)/internal.pas; \ @@ -331,14 +340,17 @@ for file in *.pas *.inc *.c *.h; do \ $(INSTALL_DATA) $$file $(unitsubdir)/$$file; \ chmod a-x $(unitsubdir)/$$file; \ - done + done ;; \ + *) ;; esac pascal.install-demos: pascal.install-dir - cd $(srcdir)/p/demos; \ + case "$(LANGUAGES)" in \ + *[Pp]ascal*) cd $(srcdir)/p/demos; \ for file in *; do \ $(INSTALL_DATA) $$file $(demodir)/$$file; \ chmod a-x $(demodir)/$$file; \ - done + done ;; \ + *) ;; esac # Install the driver program as $(target)-gpc # and also as either gpc (if native) or $(tooldir)/bin/gpc. @@ -380,7 +392,8 @@ fi pascal.install-info: pascal.info - -rm -f $(infodir)/gpc.info* ; + case "$(LANGUAGES)" in \ + *[Pp]ascal*) rm -f $(infodir)/gpc.info* ; \ if [ -f p/doc/gpc.info ]; then \ cd p/doc; \ else \ @@ -388,8 +401,9 @@ fi; \ for f in gpc.info*; do \ $(INSTALL_DATA) $$f $(infodir)/$$f; \ - done - -chmod a-x $(infodir)/gpc.info* + done; \ + chmod a-x $(infodir)/gpc.info* ;; \ + *) ;; esac pascal.install-man: $(srcdir)/p/gpc.1 -if [ -f gpc1$(exeext) ] ; then \ @@ -413,13 +427,15 @@ else true; fi pascal.install-dir: - -for directory in $(bindir) $(libsubdir) $(unitsubdir) $(demodir) $(infodir) $(mandir); do \ + case "$(LANGUAGES)" in \ + *[Pp]ascal*) for directory in $(bindir) $(libsubdir) $(unitsubdir) $(demodir) $(infodir) $(mandir); do \ if [ -d $$directory ]; then \ true; \ else \ mkdir -p $$directory; \ fi; \ - done + done ;; \ + *) ;; esac # Install gpc1 et.al. # Do *not* overwrite files if they exist. diff -urN gpc.orig/p/units/crt.pas gpc/p/units/crt.pas --- gpc.orig/p/units/crt.pas Sat Jan 9 10:55:24 1999 +++ gpc/p/units/crt.pas Sun Feb 14 07:17:19 1999 @@ -6,7 +6,7 @@ CRT (Crt Replacement Tool) -- BP compatible CRT unit This unit needs the ncurses library which should be available for -almost any system. For Dos systems, where ncurses is not availale, +almost any system. For Dos systems, where ncurses is not available, AFAIK, it is configured to use PDCurses 2.3 instead (file curse23.zip). On Unix systems with X11, it can also use PDCurses to produce pure X11 programs. The advantage is that they don't need an xterm with a valid -- Niels Kristian Bech Jensen -- nkbj@image.dk -- http://www.image.dk/~nkbj/ ----------->> Stop software piracy --- use free software! <<-----------