This is the mail archive of the newlib@sourceware.cygnus.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Ok? Top-level Makefile.in archiver change


Hello,

The attatched patch re-aranges the way the top level Makefile.in creates
a release (e.g. make -f Makefile.in binutils.tar.bz).  Namely, it splits
the process into two more evenly balanced steps:

	o	do-proto-toplev

	o	do-tar-bz2

The rewritten taz target then just calls on each of those in turn.  By
doing that I can more easily slip in a few extra steps (so far just
do-md5sum) for the GDB release process.

Ok?

	Andrew
Wed Apr 12 16:42:48 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* Makefile.in (gdb-taz): New target.  GDB specific archive.
	(do-md5sum): New target.
	(MD5PROG): Define.
	(PACKAGE): Default to TOOL.
	(VER): Default to a shell script.
	(taz): Rewrite target.  Move real work to do-proto-toplev.
	(do-proto-toplev): New target. Create $(PACKAGE)-$(VER) link.
	(do-tar-bz2): Delete creation of $(PACKAGE)-$(VER) link.
	(gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2,
 	insight.tar.bz2): Use gdb-taz to create archive.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/Makefile.in,v
retrieving revision 1.12
diff -p -r1.12 Makefile.in
*** Makefile.in	2000/04/03 01:24:45	1.12
--- Makefile.in	2000/04/12 07:26:12
*************** NM = nm
*** 111,116 ****
--- 111,117 ----
  LD = ld
  
  BZIPPROG = bzip2
+ MD5PROG = md5sum
  
  # These values are substituted by configure.
  DEFAULT_YACC = yacc
*************** ETC_SUPPORT= Makefile.in configure confi
*** 1690,1698 ****
  # this macro.
  SUPPORT_FILES = list-of-support-files-for-tool-in-question
  
! .PHONY: taz
  
  taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
  	# Take out texinfo from a few places.
  	sed -e '/^all\.normal: /s/\all-texinfo //' \
  	    -e '/^	install-texinfo /d' \
--- 1691,1720 ----
  # this macro.
  SUPPORT_FILES = list-of-support-files-for-tool-in-question
  
! # NOTE: No double quotes in the below.  It is used within shell script
! # as VER="$(VER)"
! VER = `	if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
! 	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
! 	else \
! 	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
! 	fi`
! PACKAGE = $(TOOL)
  
+ .PHONY: taz
  taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ 	$(MAKE) -f Makefile.in do-proto-toplev do-tar-bz2 \
+ 		TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ 		SUPPORT_FILES="$(SUPPORT_FILES)"
+ 
+ .PHONY: gdb-taz
+ gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ 	$(MAKE) -f Makefile.in do-proto-toplev do-md5sum do-tar-bz2 \
+ 		TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+ 		SUPPORT_FILES="$(SUPPORT_FILES)"
+ 
+ .PHONY: do-proto-toplev
+ do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+ 	echo "==> Making $(PACKAGE)-$(VER)/"
  	# Take out texinfo from a few places.
  	sed -e '/^all\.normal: /s/\all-texinfo //' \
  	    -e '/^	install-texinfo /d' \
*************** taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) te
*** 1742,1766 ****
  	  ln -s ../../../texinfo/util/tex3patch	proto-toplev/texinfo/util ; \
  	else true; fi
  	chmod -R og=u . || chmod og=u `find . -print`
! 	if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
! 	  ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
! 	else \
! 	  ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
! 	fi; \
! 	if test x"$(PACKAGE)" = x; then \
! 	  package="$(TOOL)"; \
! 	else \
! 	  package="$(PACKAGE)"; \
! 	fi; \
! 	$(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver PACKAGE=$$package
  
  do-tar-bz2:
  	echo "==> Making $(PACKAGE)-$(VER).tar.bz2"
- 	-rm -f $(PACKAGE)-$(VER)
- 	ln -s proto-toplev $(PACKAGE)-$(VER)
  	tar cfh $(PACKAGE)-$(VER).tar $(PACKAGE)-$(VER)
  	$(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
  
  TEXINFO_SUPPORT= texinfo/texinfo.tex
  DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
  
--- 1764,1785 ----
  	  ln -s ../../../texinfo/util/tex3patch	proto-toplev/texinfo/util ; \
  	else true; fi
  	chmod -R og=u . || chmod og=u `find . -print`
! 	#
! 	-rm -f $(PACKAGE)-$(VER)
! 	ln -s proto-toplev $(PACKAGE)-$(VER)
  
+ .PHONY: do-tar-bz2
  do-tar-bz2:
  	echo "==> Making $(PACKAGE)-$(VER).tar.bz2"
  	tar cfh $(PACKAGE)-$(VER).tar $(PACKAGE)-$(VER)
  	$(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
  
+ .PHONY: do-md5sum
+ do-md5sum:
+ 	echo "==> Adding md5 checksum to top-level directory"
+ 	( cd proto-toplev && find * -follow -type f -print | xargs $(MD5PROG) ) > md5.sum
+ 	mv md5.sum proto-toplev
+ 
  TEXINFO_SUPPORT= texinfo/texinfo.tex
  DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
  
*************** gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_S
*** 1797,1803 ****
  .PHONY: gdb.tar.bz2
  GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
  gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in taz TOOL=gdb \
  		SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
  
  .PHONY: dejagnu.tar.bz2
--- 1816,1822 ----
  .PHONY: gdb.tar.bz2
  GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
  gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in gdb-taz TOOL=gdb \
  		SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
  
  .PHONY: dejagnu.tar.bz2
*************** dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAG
*** 1809,1827 ****
  .PHONY: gdb+dejagnu.tar.bz2
  GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
  gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=gdb+dejagnu \
  		SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
  
  .PHONY: insight.tar.bz2
  INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
  insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=insight \
  		SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
  
  .PHONY: insight+dejagnu.tar.bz2
  INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
  insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE="insight+dejagnu" \
  		SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
  
  .PHONY: newlib.tar.bz2
--- 1828,1846 ----
  .PHONY: gdb+dejagnu.tar.bz2
  GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
  gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \
  		SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
  
  .PHONY: insight.tar.bz2
  INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
  insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \
  		SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
  
  .PHONY: insight+dejagnu.tar.bz2
  INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
  insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
! 	$(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \
  		SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
  
  .PHONY: newlib.tar.bz2

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]