1
0
Selaa lähdekoodia

more flexible list of files to ignore when doing update-patches

e.g. for use with autoconf, but also for build-time generated
files that are part of the distfile

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Thorsten Glaser 10 vuotta sitten
vanhempi
commit
5f2187e92c
4 muutettua tiedostoa jossa 12 lisäystä ja 13 poistoa
  1. 1 0
      mk/buildhlp.mk
  2. 5 0
      mk/pkg-bottom.mk
  3. 3 0
      package/xbmc/Makefile
  4. 3 13
      scripts/update-patches

+ 1 - 0
mk/buildhlp.mk

@@ -111,6 +111,7 @@ endif
 	@WRKDIST=$(call shellescape,${WRKDIST}) \
 	    WRKDIR1=$(call shellescape,${WRKDIR}) \
 	    PATH=$(call shellescape,${HOST_PATH}) \
+	    $(call shellexport,DIFF_IGNOREFILES) \
 	    mksh ${TOPDIR}/scripts/update-patches2
 
 .PHONY: update-patches host-update-patches

+ 5 - 0
mk/pkg-bottom.mk

@@ -267,3 +267,8 @@ ifeq (,$(filter noremove,${PKG_OPTS}))
 	fi
 endif
 	@rm -f '${STAGING_PKG_DIR}/${PKG_NAME}'
+
+ifneq (,$(filter autoreconf,${AUTOTOOL_STYLE}))
+DIFF_IGNOREFILES?=	configure missing depcomp install-sh INSTALL \
+			aclocal.m4 config.h.in Makefile.in */Makefile.in
+endif

+ 3 - 0
package/xbmc/Makefile

@@ -37,6 +37,9 @@ PKG_LIBC_DEPENDS:=	glibc
 
 WRKDIST=		$(WRKDIR)/$(PKG_NAME)-$(PKG_VERSION)-Frodo
 
+DIFF_IGNOREFILES:=	configure missing depcomp install-sh INSTALL \
+			aclocal.m4 config.h.in */Makefile.in
+
 include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,XBMC,xbmc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

+ 3 - 13
scripts/update-patches

@@ -82,9 +82,6 @@ fi
 
 if [[ -e $WRKDIST/../.autoreconf_done ]]; then
 	touch "$ORGDIST/.autoreconf_done"
-	ignore_autoconf=1
-else
-	ignore_autoconf=0
 fi
 
 DIFF_FLAGS="-adu -I \"^--- $(print -r -- "$D_SUBP.orig/" | $TRANSFORM)@@	.*\""
@@ -95,16 +92,9 @@ while IFS= read -p -d '' -r file; do
 	file=${file#./}
 	#print -r -- "DEBUG: <$file>" >>/tmp/debug
 	[[ ! -e $ORGDIST/$file && $patch_newfiles = 0 ]] && continue
-	if (( ignore_autoconf )); then
-		[[ $file = configure ]] && continue
-		[[ $file = missing ]] && continue
-		[[ $file = depcomp ]] && continue
-		[[ $file = install-sh ]] && continue
-		[[ $file = aclocal.m4 ]] && continue
-		[[ $file = INSTALL ]] && continue
-		[[ $file = config.h.in ]] && continue
-		[[ ${file##*/} = Makefile.in ]] && continue
-	fi
+	for i in $DIFF_IGNOREFILES; do
+		[[ $file = $i ]] && continue
+	done
 	cmp -s "$ORGDIST/$file" "$WRKDIST/$file" && continue
 	print -ru2 -- "Processing ${file}..."
 	# look in patchdir for an existing patchfile matching this