[Pkg-pascal-devel] [fpc] 03/05: Clean the way handling make files generation and removal.

Paul Gevers elbrus at debian.org
Thu Mar 20 19:48:36 UTC 2014


[resent as my previous message never reached the list]

Hi Abou,

It looks like you and I have different opinions on the issue.

You reverted much of what I did in commit a4620f8 and 8b3665f. I
specifically removed the need to run fpmake if you just want to clean
stuff. It makes the build process longer for not much gain (as far as I
am concerned). If there are no makefiles, you can assume there is also
nothing to clean up. But I can agree that we disagree (if that is the
outcome of this discussion). As I found a way to build without cleaning
up (I know I am clean...) I can live with the changes (although I still
have to check the logic of some). But I have seen in the past that
people that need to check and/or touch fpc are quite easily annoyed by it.

Paul

On 19-03-14 20:25, Abou Al Montacir wrote:
> This is an automated email from the git hooks/post-receive script.
> 
> abou-almontacir-guest pushed a commit to branch master
> in repository fpc.
> 
> commit 3b0ebb4ffa296597e305e292fc36600200ddd06d
> Author: Abou Al Montacir <abou.almontacir at sfr.fr>
> Date:   Tue Mar 18 22:18:53 2014 +0100
> 
>     Clean the way handling make files generation and removal.
> ---
>  debian/rules | 67 +++++++++++++++++++++++++++++++++++++-----------------------
>  1 file changed, 41 insertions(+), 26 deletions(-)
> 
> diff --git a/debian/rules b/debian/rules
> index 6ce1075..cc632e1 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -131,7 +131,7 @@ ifeq ($(CPU_TARGET),arm)
>  else
>    CYCLEOPTS:=OPT='@${CURDIR}/${DEB_HOST_FPC_OPT}'
>  endif
> -
> +# Set default compilation options
>  DEB_HOST_MULTIARCH ?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
>  DEB_BUILD_MULTIARCH ?=$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
>  
> @@ -145,7 +145,7 @@ LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS | sed -e 's/-Wl,//g' -e 's/,/ /g')
>  # Clean
>  #
>  
> -clean: clean-patched
> +clean: clean-patched clean-make-files
>  	${RM} build-arch-stamp install-arch-stamp arrange-arch-stamp configure-stamp
>  	${RM} install-man-stamp
>  	${RM} build-doc-stamp install-doc-stamp
> @@ -180,17 +180,16 @@ clean: clean-patched
>  	rm -f $(DEB_HOST_FPC_OPT)
>  	dh_clean
>  
> -clean-patched:
> +clean-patched: make-files
>  	@echo "--- Cleaning"
>  	dh_testdir
> -	[ ! -f fpcsrc/Makefile ] || $(MAKE) -C fpcsrc compiler_distclean
> -	[ ! -f fpcsrc/Makefile ] || $(MAKE) -C fpcsrc rtl_distclean
> -	[ ! -f fpcsrc/Makefile ] || $(MAKE) -C fpcsrc packages_distclean
> -	[ ! -f fpcsrc/Makefile ] || $(MAKE) -C fpcsrc ide_distclean
> -	[ ! -f fpcsrc/Makefile ] || $(MAKE) -C fpcsrc utils_distclean
> -	[ ! -f fpcdocs/Makefile ] || $(MAKE) -C fpcdocs clean
> -	find -regex '.*\.\(a\|or?\|so\.*\|ppu\)' -delete
> -	dh_prep
> +	$(MAKE) -C fpcsrc compiler_distclean
> +	$(MAKE) -C fpcsrc rtl_distclean
> +	$(MAKE) -C fpcsrc packages_distclean
> +	$(MAKE) -C fpcsrc ide_distclean
> +	$(MAKE) -C fpcsrc utils_distclean
> +	$(MAKE) -C fpcdocs clean
> +	find -regex '.*\.\(a\|or?\|so\.*\|ppu\|.compiled\)' -delete
>  
>  ###################
>  # Debian files
> @@ -205,17 +204,25 @@ debian-files-stamp:debian/fixdeb debian/*.in
>  	$< debian/*.in
>  	touch debian-files-stamp
>  
> +make-files: make-files-stamp
> +make-files-stamp:
> +	# Regenrate make files using fpcmake.
> +	find * -name Makefile.fpc -exec ${FPCMAKE} -Tall -q '{}' ';'
> +	touch $@
> +
> +clean-make-files:
> +	# Remove auto-generated make files.
> +	find * -name Makefile.fpc -execdir sh -c '${RM} $$(basename {} .fpc)' ';'
> +	${RM} make-files-stamp
> +
>  ###################
>  # Arch packages
>  #
>  
> -configure: configure-stamp
> +configure: debian-files clean-make-files make-files configure-stamp
>  configure-stamp:${FPCMAKE}
>  	dh_testdir
> -	# Remove auto-generated make files.
> -	find * -name Makefile.fpc -execdir 'sh' '-c' '${RM} $$(basename {} .fpc)' ';'
> -	# Regenrate make files using fpcmake.
> -	find * -name Makefile.fpc -exec ${FPCMAKE} -Tall -q '{}' ';'
> +	dh_prep
>  	# Remove auto-generated version file.
>  	${RM} fpcsrc/compiler/version.inc
>  	# Add version.inc:
> @@ -296,6 +303,7 @@ arrange-arch-stamp:
>  
>  build-indep:
>  install-indep:
> +	touch install-indep-stamp
>  
>  install-man: install-man-stamp
>  install-man-stamp:
> @@ -311,7 +319,7 @@ install-man-stamp:
>  # Documentation
>  #
>  
> -build-doc: configure debian-files build-doc-stamp
> +build-doc: build-doc-stamp
>  build-doc-stamp:
>  	@echo "--- Building Documentation"
>  	dh_testdir
> @@ -338,16 +346,16 @@ install-doc-stamp:
>  # Source
>  #
>  
> -install-source: install-source-stamp
> -install-source-stamp: 
> +install-source: clean-patched install-source-stamp
> +install-source-stamp:
>  	@echo "--- Cleaning the tree and copying the source code"
>  	dh_testdir
>  	dh_testroot
>  	${MKDIR} ${SRC_DIR}
>  	${CP} -t ${SRC_DIR} \
> -	$(BUILD_DIR)/fpcsrc/compiler \
> -	$(BUILD_DIR)/fpcsrc/packages \
> -	$(BUILD_DIR)/fpcsrc/rtl
> +		$(CURDIR)/fpcsrc/compiler \
> +		$(CURDIR)/fpcsrc/packages \
> +		$(CURDIR)/fpcsrc/rtl
>  	touch install-source-stamp
>  
>  ###################
> @@ -363,7 +371,13 @@ binary: binary-arch binary-indep
>  # Deb building
>  #
>  
> -binary-indep: install-doc install-source debian-files
> +configure-indep: configure-indep-stamp configure
> +configure-indep-stamp:
> +	@echo -- Configure indep
> +	dh_prep
> +	touch configure-indep-stamp
> +
> +binary-indep: configure-indep install-doc install-source
>  	@echo "--- Building: arch-indep packages"
>  	dh_testdir
>  	dh_testroot
> @@ -393,7 +407,7 @@ ifeq (${DEB_BUILD},0)
>  	done
>  endif
>  	dh_compress -i -X.pdf
> -	dh_fixperms -i
> +	dh_fixperms
>  	dh_installdebconf -i
>  	dh_installdeb -i
>  	dh_gencontrol -i
> @@ -410,7 +424,7 @@ binary-arch: arrange-arch
>  	dh_installexamples -a
>  	dh_strip -s
>  	dh_compress -a
> -	dh_fixperms -a
> +	dh_fixperms
>  	dh_installdebconf -a
>  	dh_installdeb -a
>  	dh_shlibdeps -s
> @@ -421,7 +435,8 @@ binary-arch: arrange-arch
>  .PHONY: build clean binary binary-arch \
>  	binary-indep debian-files build-arch \
>  	install install-indep install-arch \
> -	configure get-orig-source build-doc
> +	configure configure-indep make-files clean-make-files \
> +	get-orig-source build-doc
>  
>  get-orig-source:
>  	-uscan --upstream-version=0 --rename
> 




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20140320/0f0c27df/attachment.sig>


More information about the Pkg-pascal-devel mailing list