diff --git a/Makefile b/Makefile index 46525e3790..ae46a9fae9 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# Don't edit, this file is generated by FPCMake Version 1.1 [2002/10/20] +# Don't edit, this file is generated by FPCMake Version 1.1 [2002/11/16] # default: help MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx @@ -312,6 +312,7 @@ export DIST_DESTDIR:=$(BASEDIR) endif BASEPACKDIR=$(BASEDIR)/basepack FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(EXEEXT) +CLEANOPTS=FPC=$(PPNEW) BUILDOPTS=FPC=$(PPNEW) RELEASE=1 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW) ifneq ($(wildcard ide),) @@ -1716,13 +1717,13 @@ distclean: clean build: build-stamp.$(OS_TARGET) build-stamp.$(OS_TARGET): $(MAKE) compiler_cycle - $(MAKE) rtl_clean - $(MAKE) packages_clean - $(MAKE) fcl_clean - $(MAKE) utils_clean + $(MAKE) rtl_clean $(CLEANOPTS) + $(MAKE) packages_clean $(CLEANOPTS) + $(MAKE) fcl_clean $(CLEANOPTS) + $(MAKE) utils_clean $(CLEANOPTS) ifdef IDE - $(MAKE) fv_clean - $(MAKE) ide_clean + $(MAKE) fv_clean $(CLEANOPTS) + $(MAKE) ide_clean $(CLEANOPTS) endif $(MAKE) rtl_$(ALLTARGET) $(BUILDOPTS) $(MAKE) packages_base_$(ALLTARGET) $(BUILDOPTS) @@ -1908,7 +1909,7 @@ endif ifdef inUnix ifneq ($(wildcard $(CVSINSTALL)/fpc.spec),) .PHONY: rpmcopy rpm -RPMFPCVERSION:=$(shell grep 'define fpcversion' $(CVSINSTALL)/fpc.spec | awk '{ print $$3 }') +RPMFPCVERSION:=$(shell grep '^Version:' $(CVSINSTALL)/fpc.spec | awk '{ print $$2 }') REDHATDIR=/usr/src/redhat RPMSOURCESDIR:=$(REDHATDIR)/SOURCES RPMSPECDIR:=$(REDHATDIR)/SPECS @@ -1933,14 +1934,18 @@ rpmcopy: distclean $(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR) find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(RPMFPCVERSION)-src.tar.gz +ifndef NODOCS rm -rf $(DOCSRCDIR) cp $(CVSINSTALL)/fpc-docs.spec $(RPMSPECDIR)/fpc-docs-$(RPMFPCVERSION).spec install -d $(DOCSRCDIR) $(COPYTREE) docs $(DOCSRCDIR) find $(DOCSRCDIR) -name 'CVS*' | xargs -n1 rm -rf cd $(DOCSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-docs-$(RPMFPCVERSION)-src.tar.gz +endif rpm: checkfpcdir rpmcopy cd $(RPMSPECDIR) ; rpm --nodeps -ba fpc-$(RPMFPCVERSION).spec +ifndef NODOCS cd $(RPMSPECDIR) ; rpm --nodeps -ba fpc-docs-$(RPMFPCVERSION).spec +endif endif # spec found endif diff --git a/Makefile.fpc b/Makefile.fpc index c3f710ba5d..d85b706a39 100644 --- a/Makefile.fpc +++ b/Makefile.fpc @@ -140,6 +140,7 @@ BASEPACKDIR=$(BASEDIR)/basepack FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(EXEEXT) # Build/install options +CLEANOPTS=FPC=$(PPNEW) BUILDOPTS=FPC=$(PPNEW) RELEASE=1 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW) @@ -277,13 +278,13 @@ build-stamp.$(OS_TARGET): # create new compiler $(MAKE) compiler_cycle # clean - $(MAKE) rtl_clean - $(MAKE) packages_clean - $(MAKE) fcl_clean - $(MAKE) utils_clean + $(MAKE) rtl_clean $(CLEANOPTS) + $(MAKE) packages_clean $(CLEANOPTS) + $(MAKE) fcl_clean $(CLEANOPTS) + $(MAKE) utils_clean $(CLEANOPTS) ifdef IDE - $(MAKE) fv_clean - $(MAKE) ide_clean + $(MAKE) fv_clean $(CLEANOPTS) + $(MAKE) ide_clean $(CLEANOPTS) endif # build everything $(MAKE) rtl_$(ALLTARGET) $(BUILDOPTS) @@ -571,7 +572,7 @@ ifneq ($(wildcard $(CVSINSTALL)/fpc.spec),) .PHONY: rpmcopy rpm -RPMFPCVERSION:=$(shell grep 'define fpcversion' $(CVSINSTALL)/fpc.spec | awk '{ print $$3 }') +RPMFPCVERSION:=$(shell grep '^Version:' $(CVSINSTALL)/fpc.spec | awk '{ print $$2 }') REDHATDIR=/usr/src/redhat RPMSOURCESDIR:=$(REDHATDIR)/SOURCES @@ -599,16 +600,20 @@ rpmcopy: distclean find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf cd $(RPMSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-$(RPMFPCVERSION)-src.tar.gz # fpc-docs.rpm +ifndef NODOCS rm -rf $(DOCSRCDIR) cp $(CVSINSTALL)/fpc-docs.spec $(RPMSPECDIR)/fpc-docs-$(RPMFPCVERSION).spec install -d $(DOCSRCDIR) $(COPYTREE) docs $(DOCSRCDIR) find $(DOCSRCDIR) -name 'CVS*' | xargs -n1 rm -rf cd $(DOCSRCDIR) ; tar cvz * > $(RPMSOURCESDIR)/fpc-docs-$(RPMFPCVERSION)-src.tar.gz +endif rpm: checkfpcdir rpmcopy cd $(RPMSPECDIR) ; rpm --nodeps -ba fpc-$(RPMFPCVERSION).spec +ifndef NODOCS cd $(RPMSPECDIR) ; rpm --nodeps -ba fpc-docs-$(RPMFPCVERSION).spec +endif endif # spec found