mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 11:26:10 +02:00
Test of makefile log !
This commit is contained in:
parent
3aba2f9ef0
commit
c0aaf6adc1
@ -1,529 +1,418 @@
|
|||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
# This file is part of the Free Pascal run time library.
|
# This file is part of the Free Pascal run time library.
|
||||||
# Copyright (c) 1993-98 by the Free Pascal Development Team
|
# Copyright (c) 1993-98 by the Free Pascal Development Team
|
||||||
#
|
#
|
||||||
# Makefile for the Free Pascal Compiler
|
# Makefile for the Free Pascal Compiler
|
||||||
#
|
#
|
||||||
# See the file COPYING.FPC, included in this distribution,
|
# See the file COPYING.FPC, included in this distribution,
|
||||||
# for details about the copyright.
|
# for details about the copyright.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
#
|
#
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Try to determine Operating System
|
# Try to determine Operating System
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
BASEDIR=$(shell pwd)
|
BASEDIR=$(shell pwd)
|
||||||
|
|
||||||
# in linux no : in pathes
|
# in linux no : in pathes
|
||||||
ifeq ($(findstring :,$(BASEDIR)),)
|
ifeq ($(findstring :,$(BASEDIR)),)
|
||||||
inlinux=1
|
inlinux=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# in case pwd is not present on the DOS-OS
|
# in case pwd is not present on the DOS-OS
|
||||||
ifeq ($(strip $(BASEDIR)),'')
|
ifeq ($(strip $(BASEDIR)),'')
|
||||||
inlinux=
|
inlinux=
|
||||||
BASEDIR:=.
|
BASEDIR:=.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# What compiler to use
|
# What compiler to use
|
||||||
ifndef PP
|
ifndef PP
|
||||||
PP=ppc386
|
PP=ppc386
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Setup Targets
|
# Setup Targets
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
# what target do we use
|
# what target do we use
|
||||||
# currently dos go32v2 os2 and linux are available
|
# currently dos go32v2 os2 and linux are available
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
TARGET=linux
|
TARGET=linux
|
||||||
else
|
else
|
||||||
TARGET=go32v2
|
TARGET=go32v2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# What processor do you want to compile for : i386 m68k (case sensitive !!)
|
# What processor do you want to compile for : i386 m68k (case sensitive !!)
|
||||||
ifndef CPU
|
ifndef CPU
|
||||||
CPU= i386
|
CPU= i386
|
||||||
# CPU= m68k
|
# CPU= m68k
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Setup Files Directories
|
# Setup Files Directories
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
# Set os-dependent files and extensions
|
# Set os-dependent files and extensions
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
EXEEXT=
|
EXEEXT=
|
||||||
REPLACE=mv -f
|
REPLACE=mv -f
|
||||||
CP=cp -f
|
CP=cp -f
|
||||||
else
|
else
|
||||||
EXEEXT=.exe
|
EXEEXT=.exe
|
||||||
REPLACE=move /y
|
REPLACE=move /y
|
||||||
CP=cp -f
|
CP=cp -f
|
||||||
endif
|
endif
|
||||||
|
|
||||||
COMPILERDIR=$(BASEDIR)
|
COMPILERDIR=$(BASEDIR)
|
||||||
RTLDIR:=$(BASEDIR)/../rtl
|
RTLDIR:=$(BASEDIR)/../rtl
|
||||||
|
|
||||||
# specify where units are.
|
# specify where units are.
|
||||||
# This needs to be set correctly for the 'remake' target to work !
|
# This needs to be set correctly for the 'remake' target to work !
|
||||||
ifndef UNITDIR
|
ifndef UNITDIR
|
||||||
UNITDIR=$(RTLDIR)/$(TARGET)
|
UNITDIR=$(RTLDIR)/$(TARGET)
|
||||||
ifeq ($(TARGET),dos)
|
ifeq ($(TARGET),dos)
|
||||||
UNITDIR=$(RTLDIR)/dos/go32v1
|
UNITDIR=$(RTLDIR)/dos/go32v1
|
||||||
endif
|
endif
|
||||||
ifeq ($(TARGET),go32v2)
|
ifeq ($(TARGET),go32v2)
|
||||||
UNITDIR=$(RTLDIR)/dos/go32v2
|
UNITDIR=$(RTLDIR)/dos/go32v2
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
# not def UNITDIR
|
# not def UNITDIR
|
||||||
|
|
||||||
# Where to install the executable program/link
|
# Where to install the executable program/link
|
||||||
ifndef PROGINSTALLDIR
|
ifndef PROGINSTALLDIR
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
PROGINSTALLDIR = /usr/bin
|
PROGINSTALLDIR = /usr/bin
|
||||||
else
|
else
|
||||||
PROGINSTALLDIR = c:\pp\bin
|
PROGINSTALLDIR = c:\pp\bin
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# !!! Linux only
|
# !!! Linux only
|
||||||
# Where to install the _real_executable and support files
|
# Where to install the _real_executable and support files
|
||||||
ifndef LIBINSTALLDIR
|
ifndef LIBINSTALLDIR
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
LIBINSTALLDIR=/usr/lib/fpc/0.99.5
|
LIBINSTALLDIR=/usr/lib/fpc/0.99.5
|
||||||
# for a.out
|
# for a.out
|
||||||
# LIBINSTALLDIR=/usr/lib/ppc/aout/0.99.5
|
# LIBINSTALLDIR=/usr/lib/ppc/aout/0.99.5
|
||||||
else
|
else
|
||||||
LIBINSTALLDIR=$(PROGINSTALLDIR)
|
LIBINSTALLDIR=$(PROGINSTALLDIR)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Where the .msg files will be stored
|
# Where the .msg files will be stored
|
||||||
ifndef MSGINSTALLDIR
|
ifndef MSGINSTALLDIR
|
||||||
MSGINSTALLDIR=$(LIBINSTALLDIR)/msg
|
MSGINSTALLDIR=$(LIBINSTALLDIR)/msg
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef UNITINSTALLDIR
|
ifndef UNITINSTALLDIR
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
UNITINSTALLDIR=$(LIBINSTALLDIR)/linuxunits
|
UNITINSTALLDIR=$(LIBINSTALLDIR)/linuxunits
|
||||||
else
|
else
|
||||||
UNITINSTALLDIR=$(UNITDIR)
|
UNITINSTALLDIR=$(UNITDIR)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# !!! Linux only
|
# !!! Linux only
|
||||||
# GCCLIBPATH is wat is it on my PC... it MUST be set in the main Makefile
|
# GCCLIBPATH is wat is it on my PC... it MUST be set in the main Makefile
|
||||||
ifndef GCCLIBPATH
|
ifndef GCCLIBPATH
|
||||||
GCCLIBPATH=/usr/lib/gcc-lib/i486-linux/2.6.3
|
GCCLIBPATH=/usr/lib/gcc-lib/i486-linux/2.6.3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# When making diffs of the sources
|
# When making diffs of the sources
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
# Diff program
|
# Diff program
|
||||||
DIFF = diff
|
DIFF = diff
|
||||||
|
|
||||||
# Diff3 program
|
# Diff3 program
|
||||||
DIFF3 = diff3
|
DIFF3 = diff3
|
||||||
|
|
||||||
# Options to diff.
|
# Options to diff.
|
||||||
DIFFOPTS = -b -c
|
DIFFOPTS = -b -c
|
||||||
|
|
||||||
# Directory where files are to make diffs with..
|
# Directory where files are to make diffs with..
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
DIFDIR = /usr/local/fpk/work/new/compiler
|
DIFDIR = /usr/local/fpk/work/new/compiler
|
||||||
else
|
else
|
||||||
DIFDIR = h:/cvs/compiler
|
DIFDIR = h:/cvs/compiler
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Directory where reference files are for diff3
|
# Directory where reference files are for diff3
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
REFDIR = /usr/local/fpk/dist/source/compiler
|
REFDIR = /usr/local/fpk/dist/source/compiler
|
||||||
else
|
else
|
||||||
REFDIR = h:/myref/compiler
|
REFDIR = h:/myref/compiler
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# End of configurable section. Do not edit after this line.
|
# End of configurable section. Do not edit after this line.
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
# set correct defines (also needed by mkdep)
|
# set correct defines (also needed by mkdep)
|
||||||
PPDEFS:=-d$(CPU) -dGDB -dFPC
|
PPDEFS:=-d$(CPU) -dGDB -dFPC
|
||||||
|
|
||||||
# Set the needed compiler options
|
# Set the needed compiler options
|
||||||
PPOPTS:=$(OPT) $(PPDEFS) -Sg
|
PPOPTS:=$(OPT) $(PPDEFS) -Sg
|
||||||
|
|
||||||
# Unitdir specified ?
|
# Unitdir specified ?
|
||||||
ifneq ("$(UNITDIR)", "")
|
ifneq ("$(UNITDIR)", "")
|
||||||
PPOPTS:=$(PPOPTS) -Up$(UNITDIR)
|
PPOPTS:=$(PPOPTS) -Up$(UNITDIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Do we need the GCC library ?
|
# Do we need the GCC library ?
|
||||||
ifeq ($(LINK_TO_C),YES)
|
ifeq ($(LINK_TO_C),YES)
|
||||||
PPOPTS:=$(PPOPTS) -Fg$(GCCLIBPATH)
|
PPOPTS:=$(PPOPTS) -Fg$(GCCLIBPATH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Create the whole compiler commandline
|
# Create the whole compiler commandline
|
||||||
COMPILER=$(PP) $(PPOPTS)
|
COMPILER=$(PP) $(PPOPTS)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Setup os-independent filenames
|
# Setup os-independent filenames
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
PPEXENAME=pp$(EXEEXT)
|
PPEXENAME=pp$(EXEEXT)
|
||||||
EXENAME=ppc386$(EXEEXT)
|
EXENAME=ppc386$(EXEEXT)
|
||||||
TEMPNAME=ppc$(EXEEXT)
|
TEMPNAME=ppc$(EXEEXT)
|
||||||
TEMPNAME1=ppc1$(EXEEXT)
|
TEMPNAME1=ppc1$(EXEEXT)
|
||||||
TEMPNAME2=ppc2$(EXEEXT)
|
TEMPNAME2=ppc2$(EXEEXT)
|
||||||
TEMPNAME3=ppc3$(EXEEXT)
|
TEMPNAME3=ppc3$(EXEEXT)
|
||||||
MAKEDEP=mkdep$(EXEEXT)
|
MAKEDEP=mkdep$(EXEEXT)
|
||||||
|
|
||||||
PASFILES:=$(shell ls *.pas)
|
PASFILES:=$(shell ls *.pas)
|
||||||
INCFILES:=$(shell ls *.inc)
|
INCFILES:=$(shell ls *.inc)
|
||||||
MSGFILES:=$(shell ls *.msg)
|
MSGFILES:=$(shell ls *.msg)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Default makefile
|
# Default makefile
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
.SUFFIXES: .pas $(EXEEXT) .ppu .dif .d3p .d3i .d3m .new
|
.SUFFIXES: .pas $(EXEEXT) .ppu .dif .d3p .d3i .d3m .new
|
||||||
|
|
||||||
.PHONY : all clean info \
|
.PHONY : all clean info \
|
||||||
cycle remake remake3 \
|
cycle remake remake3 \
|
||||||
install \
|
install \
|
||||||
diff diff3 patch rtl toflor replacediff3 restorediff3 \
|
diff diff3 patch rtl toflor replacediff3 restorediff3 \
|
||||||
test rtlzip \
|
test rtlzip \
|
||||||
|
|
||||||
.pas.ppu:
|
.pas.ppu:
|
||||||
$(COMPILER) $<
|
$(COMPILER) $<
|
||||||
|
|
||||||
.pas$(EXEEXT):
|
.pas$(EXEEXT):
|
||||||
$(COMPILER) $<
|
$(COMPILER) $<
|
||||||
|
|
||||||
all : $(EXENAME)
|
all : $(EXENAME)
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
-rm -f *.o *.ppu *.s $(EXENAME)
|
-rm -f *.o *.ppu *.s $(EXENAME)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Info
|
# Info
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
info :
|
info :
|
||||||
@echo - Target is $(TARGET)
|
@echo - Target is $(TARGET)
|
||||||
@echo - Basedir is $(BASEDIR)
|
@echo - Basedir is $(BASEDIR)
|
||||||
@echo - Pascal files are $(PASFILES)
|
@echo - Pascal files are $(PASFILES)
|
||||||
@echo - Inc files are $(INCFILES)
|
@echo - Inc files are $(INCFILES)
|
||||||
@echo - Msg files are $(MSGFILES)
|
@echo - Msg files are $(MSGFILES)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Include depencies (linux only)
|
# Include depencies (linux only)
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
$(MAKEDEP) : $(RTLDIR)/utils/mkdep.pp
|
$(MAKEDEP) : $(RTLDIR)/utils/mkdep.pp
|
||||||
$(PP) $(RTLDIR)/utils/mkdep.pp
|
$(PP) $(RTLDIR)/utils/mkdep.pp
|
||||||
$(CP) $(RTLDIR)/utils/$(MAKEDEP) $(MAKEDEP)
|
$(CP) $(RTLDIR)/utils/$(MAKEDEP) $(MAKEDEP)
|
||||||
|
|
||||||
dependencies : $(MAKEDEP)
|
dependencies : $(MAKEDEP)
|
||||||
$(MAKEDEP) pp.pas $(PPDEFS) '-A$$(COMPILER)' > depend
|
$(MAKEDEP) pp.pas $(PPDEFS) '-A$$(COMPILER)' > depend
|
||||||
|
|
||||||
include depend
|
include depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Make targets
|
# Make targets
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
msgtxt.inc: errore.msg
|
msgtxt.inc: errore.msg
|
||||||
msg2inc errore.msg msgtxt.inc msgtxt
|
msg2inc errore.msg msgtxt.inc msgtxt
|
||||||
|
|
||||||
optmsg.inc: optione.msg
|
optmsg.inc: optione.msg
|
||||||
msg2inc optione.msg optmsg.inc optiontxt
|
msg2inc optione.msg optmsg.inc optiontxt
|
||||||
|
|
||||||
msg: msgtxt.inc optmsg.inc
|
msg: msgtxt.inc optmsg.inc
|
||||||
|
|
||||||
# Make only the compiler
|
# Make only the compiler
|
||||||
ifdef inlinux
|
ifdef inlinux
|
||||||
$(EXENAME) : $(PPEXENAME)
|
$(EXENAME) : $(PPEXENAME)
|
||||||
$(COMPILER) pp.pas
|
$(COMPILER) pp.pas
|
||||||
$(REPLACE) $(PPEXENAME) $(EXENAME)
|
$(REPLACE) $(PPEXENAME) $(EXENAME)
|
||||||
else
|
else
|
||||||
$(EXENAME) : $(PASFILES) $(INCFILES) $(MSGFILES)
|
$(EXENAME) : $(PASFILES) $(INCFILES) $(MSGFILES)
|
||||||
$(COMPILER) pp.pas
|
$(COMPILER) pp.pas
|
||||||
$(REPLACE) $(PPEXENAME) $(EXENAME)
|
$(REPLACE) $(PPEXENAME) $(EXENAME)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# This target remakes the units with the currently made version
|
# This target remakes the units with the currently made version
|
||||||
remake: $(EXENAME)
|
remake: $(EXENAME)
|
||||||
$(REPLACE) $(EXENAME) $(TEMPNAME)
|
$(REPLACE) $(EXENAME) $(TEMPNAME)
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(MAKE) -C $(UNITDIR) clean
|
$(MAKE) -C $(UNITDIR) clean
|
||||||
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME)' all
|
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME)' all
|
||||||
$(MAKE) 'PP=./$(TEMPNAME)' all
|
$(MAKE) 'PP=./$(TEMPNAME)' all
|
||||||
|
|
||||||
remake3: $(TEMPNAME3)
|
remake3: $(TEMPNAME3)
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(MAKE) -C $(UNITDIR) clean
|
$(MAKE) -C $(UNITDIR) clean
|
||||||
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME3)' all
|
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME3)' all
|
||||||
$(MAKE) 'PP=./$(TEMPNAME3)' all
|
$(MAKE) 'PP=./$(TEMPNAME3)' all
|
||||||
diff $(TEMPNAME3) $(EXENAME)
|
diff $(TEMPNAME3) $(EXENAME)
|
||||||
|
|
||||||
$(TEMPNAME1) : $(EXENAME)
|
$(TEMPNAME1) : $(EXENAME)
|
||||||
$(REPLACE) $(EXENAME) $(TEMPNAME1)
|
$(REPLACE) $(EXENAME) $(TEMPNAME1)
|
||||||
|
|
||||||
$(TEMPNAME2) : $(TEMPNAME1)
|
$(TEMPNAME2) : $(TEMPNAME1)
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(MAKE) -C $(UNITDIR) clean
|
$(MAKE) -C $(UNITDIR) clean
|
||||||
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME1)' all
|
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME1)' all
|
||||||
$(MAKE) 'PP=./$(TEMPNAME1)' all
|
$(MAKE) 'PP=./$(TEMPNAME1)' all
|
||||||
$(REPLACE) $(EXENAME) $(TEMPNAME2)
|
$(REPLACE) $(EXENAME) $(TEMPNAME2)
|
||||||
|
|
||||||
$(TEMPNAME3) : $(TEMPNAME2)
|
$(TEMPNAME3) : $(TEMPNAME2)
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(MAKE) -C $(UNITDIR) clean
|
$(MAKE) -C $(UNITDIR) clean
|
||||||
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME2)' all
|
$(MAKE) -C $(UNITDIR) 'PP=$(COMPILERDIR)/$(TEMPNAME2)' all
|
||||||
$(MAKE) 'PP=./$(TEMPNAME2)' all
|
$(MAKE) 'PP=./$(TEMPNAME2)' all
|
||||||
$(REPLACE) $(EXENAME) $(TEMPNAME3)
|
$(REPLACE) $(EXENAME) $(TEMPNAME3)
|
||||||
|
|
||||||
cycle:
|
cycle:
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(MAKE) -C $(UNITDIR) clean
|
$(MAKE) -C $(UNITDIR) clean
|
||||||
$(MAKE) -C $(UNITDIR)
|
$(MAKE) -C $(UNITDIR)
|
||||||
$(MAKE) remake3
|
$(MAKE) remake3
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Installation
|
# Installation
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
install:
|
install:
|
||||||
umask 022
|
umask 022
|
||||||
strip ppc386
|
strip ppc386
|
||||||
install -m 755 -d $(LIBINSTALLDIR)
|
install -m 755 -d $(LIBINSTALLDIR)
|
||||||
install -m 755 ppc386 $(LIBINSTALLDIR)
|
install -m 755 ppc386 $(LIBINSTALLDIR)
|
||||||
ln -sf $(LIBINSTALLDIR)/ppc386 $(PROGINSTALLDIR)/ppc386
|
ln -sf $(LIBINSTALLDIR)/ppc386 $(PROGINSTALLDIR)/ppc386
|
||||||
makecfg $(LIBINSTALLDIR)/samplecfg $(UNITINSTALLDIR) $(MSGINSTALLDIR) $(GCCLIBPATH)
|
makecfg $(LIBINSTALLDIR)/samplecfg $(UNITINSTALLDIR) $(MSGINSTALLDIR) $(GCCLIBPATH)
|
||||||
install -m 755 -d $(MSGINSTALLDIR)
|
install -m 755 -d $(MSGINSTALLDIR)
|
||||||
install -m 666 errore.msg $(MSGINSTALLDIR)
|
install -m 666 errore.msg $(MSGINSTALLDIR)
|
||||||
install -m 666 errorn.msg $(MSGINSTALLDIR)
|
install -m 666 errorn.msg $(MSGINSTALLDIR)
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Diffs
|
# Diffs
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
SOURCEFILES = $(PASFILES) $(INCFILES) $(MSGFILES) Makefile
|
SOURCEFILES = $(PASFILES) $(INCFILES) $(MSGFILES) Makefile
|
||||||
|
|
||||||
DIFFFILES = $(patsubst %.pas,%.dif,$(PASFILES)) \
|
DIFFFILES = $(patsubst %.pas,%.dif,$(PASFILES)) \
|
||||||
$(patsubst %.inc,%.dif,$(INCFILES)) \
|
$(patsubst %.inc,%.dif,$(INCFILES)) \
|
||||||
$(patsubst %.msg,%.dif,$(MSGFILES)) \
|
$(patsubst %.msg,%.dif,$(MSGFILES)) \
|
||||||
Makefile.dif
|
Makefile.dif
|
||||||
|
|
||||||
DIFF3FILES = $(patsubst %.pas,%.d3p,$(PASFILES)) \
|
DIFF3FILES = $(patsubst %.pas,%.d3p,$(PASFILES)) \
|
||||||
$(patsubst %.inc,%.d3i,$(INCFILES)) \
|
$(patsubst %.inc,%.d3i,$(INCFILES)) \
|
||||||
$(patsubst %.msg,%.d3m,$(MSGFILES)) \
|
$(patsubst %.msg,%.d3m,$(MSGFILES)) \
|
||||||
Makefile.di3
|
Makefile.di3
|
||||||
|
|
||||||
PATCHFILES = $(patsubst %.pas,%.new,$(PASFILES)) \
|
PATCHFILES = $(patsubst %.pas,%.new,$(PASFILES)) \
|
||||||
$(patsubst %.inc,%.new,$(INCFILES)) \
|
$(patsubst %.inc,%.new,$(INCFILES)) \
|
||||||
$(patsubst %.msg,%.new,$(MSGFILES)) \
|
$(patsubst %.msg,%.new,$(MSGFILES)) \
|
||||||
Makefile.new
|
Makefile.new
|
||||||
|
|
||||||
%.dif : %.pas
|
%.dif : %.pas
|
||||||
-$(DIFF) $(DIFFOPTS) $*.pas $(DIFDIR)/$*.pas > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.pas $(DIFDIR)/$*.pas > $*.dif
|
||||||
|
|
||||||
%.dif : %.msg
|
%.dif : %.msg
|
||||||
-$(DIFF) $(DIFFOPTS) $*.msg $(DIFDIR)/$*.msg > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.msg $(DIFDIR)/$*.msg > $*.dif
|
||||||
|
|
||||||
%.dif : %.inc
|
%.dif : %.inc
|
||||||
-$(DIFF) $(DIFFOPTS) $*.inc $(DIFDIR)/$*.inc > $*.dif
|
-$(DIFF) $(DIFFOPTS) $*.inc $(DIFDIR)/$*.inc > $*.dif
|
||||||
|
|
||||||
Makefile.dif : Makefile
|
Makefile.dif : Makefile
|
||||||
-$(DIFF) $(DIFFOPTS) Makefile $(DIFDIR)/Makefile > Makefile.dif
|
-$(DIFF) $(DIFFOPTS) Makefile $(DIFDIR)/Makefile > Makefile.dif
|
||||||
|
|
||||||
%.new : %.pas %.dif
|
%.new : %.pas %.dif
|
||||||
-copy /y $*.pas $*.new
|
-copy /y $*.pas $*.new
|
||||||
-patch $*.new $*.dif
|
-patch $*.new $*.dif
|
||||||
|
|
||||||
%.new : %.msg %.dif
|
%.new : %.msg %.dif
|
||||||
-copy /y $*.msg $*.new
|
-copy /y $*.msg $*.new
|
||||||
-patch $*.new $*.dif
|
-patch $*.new $*.dif
|
||||||
|
|
||||||
%.new : %.inc %.dif
|
%.new : %.inc %.dif
|
||||||
-copy /y $*.inc $*.new
|
-copy /y $*.inc $*.new
|
||||||
-patch $*.new $*.dif
|
-patch $*.new $*.dif
|
||||||
|
|
||||||
Makefile.new : Makefile Makefile.dif
|
Makefile.new : Makefile Makefile.dif
|
||||||
-copy /y Makefile Makefile.new
|
-copy /y Makefile Makefile.new
|
||||||
-patch Makefile.new Makefile.dif
|
-patch Makefile.new Makefile.dif
|
||||||
|
|
||||||
%.d3p : %.pas
|
%.d3p : %.pas
|
||||||
-$(DIFF3) -m -E $*.pas $(REFDIR)/$*.pas $(DIFDIR)/$*.pas > $*.d3p
|
-$(DIFF3) -m -E $*.pas $(REFDIR)/$*.pas $(DIFDIR)/$*.pas > $*.d3p
|
||||||
|
|
||||||
%.d3m : %.msg
|
%.d3m : %.msg
|
||||||
-$(DIFF3) -m -E $*.msg $(REFDIR)/$*.msg $(DIFDIR)/$*.msg > $*.d3m
|
-$(DIFF3) -m -E $*.msg $(REFDIR)/$*.msg $(DIFDIR)/$*.msg > $*.d3m
|
||||||
|
|
||||||
%.d3i : %.inc
|
%.d3i : %.inc
|
||||||
-diff3 -m -E $*.inc $(REFDIR)/$*.inc $(DIFDIR)/$*.inc > $*.d3i
|
-diff3 -m -E $*.inc $(REFDIR)/$*.inc $(DIFDIR)/$*.inc > $*.d3i
|
||||||
|
|
||||||
Makefile.di3: Makefile
|
Makefile.di3: Makefile
|
||||||
-diff3 -m -E Makefile $(REFDIR)/Makefile $(DIFDIR)/Makefile > Makefile.di3
|
-diff3 -m -E Makefile $(REFDIR)/Makefile $(DIFDIR)/Makefile > Makefile.di3
|
||||||
|
|
||||||
diff : $(DIFFFILES)
|
diff : $(DIFFFILES)
|
||||||
|
|
||||||
diff3 : $(DIFF3FILES)
|
diff3 : $(DIFF3FILES)
|
||||||
|
|
||||||
replacediff3 : diff3
|
replacediff3 : diff3
|
||||||
copy /y *.pas *.bkp
|
copy /y *.pas *.bkp
|
||||||
copy /y *.inc *.bki
|
copy /y *.inc *.bki
|
||||||
copy /y *.msg *.bkm
|
copy /y *.msg *.bkm
|
||||||
copy /y Makefile Makefile.old
|
copy /y Makefile Makefile.old
|
||||||
copy /y *.d3p *.pas
|
copy /y *.d3p *.pas
|
||||||
copy /y *.d3i *.inc
|
copy /y *.d3i *.inc
|
||||||
copy /y *.d3m *.msg
|
copy /y *.d3m *.msg
|
||||||
copy /y Makefile.di3 Makefile
|
copy /y Makefile.di3 Makefile
|
||||||
|
|
||||||
restorediff3 :
|
restorediff3 :
|
||||||
copy /y *.bkp *.pas
|
copy /y *.bkp *.pas
|
||||||
copy /y *.bki *.inc
|
copy /y *.bki *.inc
|
||||||
copy /y *.bkm *.msg
|
copy /y *.bkm *.msg
|
||||||
copy /y Makefile.old Makefile
|
copy /y Makefile.old Makefile
|
||||||
|
|
||||||
|
|
||||||
patch : $(PATCHFILES)
|
patch : $(PATCHFILES)
|
||||||
|
|
||||||
diffclean :
|
diffclean :
|
||||||
-del *.dif
|
-del *.dif
|
||||||
-del *.di3
|
-del *.d3*
|
||||||
-del *.new
|
-del *.new
|
||||||
|
|
||||||
rtl :
|
rtl :
|
||||||
make -C $(UNITDIR) all
|
make -C $(UNITDIR) all
|
||||||
|
|
||||||
rtlclean :
|
rtlclean :
|
||||||
make -C $(UNITDIR) clean
|
make -C $(UNITDIR) clean
|
||||||
|
# Test of log at the end
|
||||||
################################################
|
# does CVS add # at start of each line ??
|
||||||
## Just an easy way to handle the diffs
|
# $Log$
|
||||||
## I just use the tiny program cpne.pp
|
# Revision 1.8 1998-04-06 12:28:23 pierre
|
||||||
## that copy to directory toflor all .dif files
|
# Test of makefile log !
|
||||||
## that are not empty
|
#
|
||||||
## empty files are deleted
|
# End of log
|
||||||
## I did not find any direct way to do this !! (PM)
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
#########################
|
|
||||||
# When making zip files
|
|
||||||
#########################
|
|
||||||
|
|
||||||
# Zip program
|
|
||||||
ifdef inlinux
|
|
||||||
ZIP = zip
|
|
||||||
else
|
|
||||||
ZIP = c:/pak/zip/zip386
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Unzip program
|
|
||||||
ifdef inlinux
|
|
||||||
UNZIP = unzp
|
|
||||||
else
|
|
||||||
UNZIP= c:/pak/zip/unzip
|
|
||||||
endif
|
|
||||||
|
|
||||||
DIF=v97
|
|
||||||
|
|
||||||
toflor : diff
|
|
||||||
-rm toflor/*.dif
|
|
||||||
cpne *.dif toflor
|
|
||||||
cp Makefile toflor/Makefile
|
|
||||||
cp cpne.pp toflor/cpne.pp
|
|
||||||
cd toflor
|
|
||||||
zip dif2$(DIF) *.dif Makefile cpne.pp
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
src_comp.zip : $(SOURCEFILES)
|
|
||||||
$(ZIP) -u src_comp $(SOURCEFILES)
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
# Distribution
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
dist :
|
|
||||||
mkdir $(DISTDIR)/compiler
|
|
||||||
cp *.pas *.inc makecfg Makefile depend errorE.msg $(DISTDIR)/compiler
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Obsolete
|
|
||||||
# does not contains all directories
|
|
||||||
#################################################
|
|
||||||
rtlzip :
|
|
||||||
echo rtl\Makefile >rtl.cfg
|
|
||||||
echo rtl\readme >>rtl.cfg
|
|
||||||
echo rtl\cfg\Makefile >>rtl.cfg
|
|
||||||
echo rtl\cfg\readme >>rtl.cfg
|
|
||||||
echo rtl\cfg\*.cfg >>rtl.cfg
|
|
||||||
echo rtl\inc\Makefile >>rtl.cfg
|
|
||||||
echo rtl\inc\readme >>rtl.cfg
|
|
||||||
echo rtl\inc\*.pp >>rtl.cfg
|
|
||||||
echo rtl\inc\*.inc >>rtl.cfg
|
|
||||||
echo rtl\i386\Makefile >>rtl.cfg
|
|
||||||
echo rtl\i386\readme >>rtl.cfg
|
|
||||||
echo rtl\i386\*.pp >>rtl.cfg
|
|
||||||
echo rtl\i386\*.inc >>rtl.cfg
|
|
||||||
echo rtl\m68k\Makefile >>rtl.cfg
|
|
||||||
echo rtl\m68k\readme >>rtl.cfg
|
|
||||||
echo rtl\m68k\*.pp >>rtl.cfg
|
|
||||||
echo rtl\m68k\*.inc >>rtl.cfg
|
|
||||||
echo rtl\template\Makefile >>rtl.cfg
|
|
||||||
echo rtl\template\readme >>rtl.cfg
|
|
||||||
echo rtl\template\*.pp >>rtl.cfg
|
|
||||||
echo rtl\template\*.pas >>rtl.cfg
|
|
||||||
echo rtl\template\*.inc >>rtl.cfg
|
|
||||||
echo rtl\dos\Makefile >>rtl.cfg
|
|
||||||
echo rtl\dos\readme >>rtl.cfg
|
|
||||||
echo rtl\dos\*.pp >>rtl.cfg
|
|
||||||
echo rtl\dos\*.inc >>rtl.cfg
|
|
||||||
echo rtl\dos\ppi\Makefile >>rtl.cfg
|
|
||||||
echo rtl\dos\ppi\readme >>rtl.cfg
|
|
||||||
echo rtl\dos\ppi\*.ppi >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\Makefile >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\readme >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\*.pp >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\*.inc >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\sbrk16.a* >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\exit16.a* >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\v2prt0.as >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v2\exceptn.as >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v1\Makefile >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v1\readme >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v1\*.pp >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v1\*.inc >>rtl.cfg
|
|
||||||
echo rtl\dos\go32v1\prt0.as >>rtl.cfg
|
|
||||||
echo rtl\linux\Makefile >>rtl.cfg
|
|
||||||
echo rtl\linux\readme >>rtl.cfg
|
|
||||||
echo rtl\linux\*.pp >>rtl.cfg
|
|
||||||
echo rtl\linux\*.inc >>rtl.cfg
|
|
||||||
echo rtl\linux\prt*.as >>rtl.cfg
|
|
||||||
echo rtl\os2\Makefile >>rtl.cfg
|
|
||||||
echo rtl\os2\readme >>rtl.cfg
|
|
||||||
echo rtl\os2\*.pas >>rtl.cfg
|
|
||||||
echo rtl\os2\*.inc >>rtl.cfg
|
|
||||||
echo rtl\os2\*.imp >>rtl.cfg
|
|
||||||
echo rtl\os2\*.a >>rtl.cfg
|
|
||||||
echo rtl\os2\*.btm >>rtl.cfg
|
|
||||||
echo rtl\os2\*.cmd >>rtl.cfg
|
|
||||||
echo rtl\os2\prt*.as >>rtl.cfg
|
|
||||||
echo rtl\os2\dosini*.as >>rtl.cfg
|
|
||||||
echo rtl.cfg >>rtl.cfg
|
|
||||||
echo rtl.txt >>rtl.cfg
|
|
||||||
echo Makefile >>rtl.cfg
|
|
||||||
cd ..
|
|
||||||
$(ZIP) -u rtl @rtl.cfg
|
|
||||||
$(UNZIP) -v rtl >rtl.lst
|
|
||||||
|
Loading…
Reference in New Issue
Block a user