r373 - in x86/trunk: packages/binutils packages/gcc scripts

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Mon Jul 18 19:54:34 PDT 2005


Author: jhuntwork
Date: 2005-07-18 20:54:34 -0600 (Mon, 18 Jul 2005)
New Revision: 373

Modified:
   x86/trunk/packages/binutils/Makefile
   x86/trunk/packages/gcc/Makefile
   x86/trunk/scripts/functions
Log:
Updates to build system - incorporate function changes suggested by Alexander

Modified: x86/trunk/packages/binutils/Makefile
===================================================================
--- x86/trunk/packages/binutils/Makefile	2005-07-18 12:21:35 UTC (rev 372)
+++ x86/trunk/packages/binutils/Makefile	2005-07-19 02:54:34 UTC (rev 373)
@@ -5,29 +5,23 @@
 VRS= 2.16.1
 DIR= $(NM)-$(VRS)
 FILE= $(DIR).tar.bz2
-URL= $(HTTP)/$(NM)/$(FILE)
-SHA= 5c80fd5657da47efc16a63fdd93ef7395319fbbf
+URL-$(FILE)= $(HTTP)/$(NM)/$(FILE)
+SHA-$(FILE)= 5c80fd5657da47efc16a63fdd93ef7395319fbbf
 
 # Targets
 # =============================================================================
 
 include $(ROOT)/scripts/functions
 
-$(FILE):
-	@$(call download,$(FILE),$(URL),$(SHA))
-
-pass1: Makefile $(FILE)
-	@unpack $(FILE)
-	@make -C $(DIR) -f ../Makefile compile-$@
+pass1: $(FILE)
+	@$(sep_dir_build)
 	@cp $(SRC)/$(FILE) $(LFSSRC)
-	@touch $@
 
 compile-pass1:
 	@$(call echo_message, Configuring)
 #==============================================================================
 # Configure commands below \/
 #==============================================================================
-	@$(sep_dir)
 	@../$(DIR)/configure --prefix=$(WD) --disable-nls >../$(DIR)-$@.log \
 	2>&1
 #
@@ -68,10 +62,8 @@
 	@touch $@
 
 
-pass2: Makefile $(FILE)
-	@unpack $(FILE)
-	@make -C $(DIR) -f ../Makefile compile-$@
-	@touch $@
+pass2: $(FILE)
+	@$(sep_dir_build)
 
 
 compile-pass2:
@@ -79,7 +71,6 @@
 #==============================================================================
 # Configure commands below \/
 #==============================================================================
-	@$(sep_dir)
 	@../$(DIR)/configure --prefix=$(WD) --disable-nls \
 	 --enable-shared --with-lib-path=$(WD)/lib >../$(DIR)-$@.log 2>&1
 #
@@ -102,7 +93,6 @@
 	@make install >>../$(DIR)-$@.log 2>&1
 	@make -C ld clean >>../$(DIR)-$@.log 2>&1
 	@make -C ld LIB_PATH=/usr/lib:/lib >>../$(DIR)-$@.log 2>&1
-
 #
 #==Status Messages===========================================
 #
@@ -128,14 +118,13 @@
 	'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
 
 stage2: Makefile $(FILE)
-	$(std_build)
+	@$(sep_dir_build)
 
 compile-stage2:
 	$(call echo_message, Configuring)
 #==============================================================================
 # Configure commands below \/
 #==============================================================================
-	@$(sep_dir)
 	@../$(DIR)/configure --prefix=/usr --enable-shared >../$(DIR)-$@.log \
 	 2>&1
 #

Modified: x86/trunk/packages/gcc/Makefile
===================================================================
--- x86/trunk/packages/gcc/Makefile	2005-07-18 12:21:35 UTC (rev 372)
+++ x86/trunk/packages/gcc/Makefile	2005-07-19 02:54:34 UTC (rev 373)
@@ -6,41 +6,29 @@
 DIR= $(NM)-$(VRS)
 
 FILE= $(DIR).tar.bz2
-SHA= dbe5935c04f799c77b49d6806f9d7db6d9b5cd35
+URL-$(FILE)= $(HTTP)/$(NM)/$(FILE)
+SHA-$(FILE)= dbe5935c04f799c77b49d6806f9d7db6d9b5cd35
 
 PATCH1= $(DIR)-no_fixincludes-1.patch
-SHA1= 2175d7dd8fa64038cc3e7db1ad57bb2cf0f8c693
+URL-$(PATCH1)= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH1)
+SHA-$(PATCH1)= 2175d7dd8fa64038cc3e7db1ad57bb2cf0f8c693
 
 PATCH2= $(DIR)-specs-2.patch
-SHA2= 946226d5a463e85829b70c922e827c1ce6cd211c
+URL-$(PATCH2)= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH2)
+SHA-$(PATCH2)= 946226d5a463e85829b70c922e827c1ce6cd211c
 
 PATCH3= $(DIR)-linkonce-1.patch
-SHA3= 50de9e6d265d191ea0e6877c4152fd1cff78fb2c
+URL-$(PATCH3)= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH3)
+SHA-$(PATCH3)= 50de9e6d265d191ea0e6877c4152fd1cff78fb2c
 
-URL= $(HTTP)/$(NM)/$(FILE)
-URL1= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH1)
-URL2= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH2)
-URL3= http://www.linuxfromscratch.org/patches/downloads/$(NM)/$(PATCH3)
 
 # Targets
 # =============================================================================
 
 include $(ROOT)/scripts/functions
 
-$(FILE):
-	@$(call download,$(FILE),$(URL),$(SHA))
-
-$(PATCH1):
-	@$(call download,$(PATCH1),$(URL1),$(SHA1))
-
-$(PATCH2):
-	@$(call download,$(PATCH2),$(URL2),$(SHA2))
-
-$(PATCH3):
-	@$(call download,$(PATCH3),$(URL3),$(SHA3))
-
-pass1: Makefile $(FILE)
-	@$(std_build)
+pass1: $(FILE)
+	@$(sep_dir_build)
 	@cp $(SRC)/$(FILE) $(LFSSRC)/
 
 compile-pass1:
@@ -48,7 +36,6 @@
 #==============================================================================
 # Configure commands below \/
 #==============================================================================
-	@$(sep_dir)
 	@../$(DIR)/configure --prefix=$(WD) --libexecdir=$(WD)/lib \
 	 --with-local-prefix=$(WD) --disable-nls --enable-shared \
 	 --enable-languages=c >../$(DIR)-$@.log 2>&1
@@ -76,8 +63,10 @@
 #
 	@$(OK)
 
-pass2: Makefile $(FILE) $(PATCH1) $(PATCH2)
-	@$(std_build)
+pass2: $(FILE) $(PATCH1) $(PATCH2)
+	@$(sep_dir_build)
+	@cp $(SRC)/$(PATCH1) $(LFSSRC)/
+	@cp $(SRC)/$(PATCH2) $(LFSSRC)/
 
 compile-pass2:
 	@$(call echo_message, Configuring)
@@ -86,10 +75,9 @@
 #==============================================================================
 	@patch -Np1 -i ../$(PATCH1)
 	@patch -Np1 -i ../$(PATCH2)
-	@$(sep_dir)
 	@../$(DIR)/configure --prefix=$(WD) --libexecdir=$(WD)/lib \
 	 --with-local-prefix=$(WD) --enable-clocale=gnu --enable-shared \
-	 --enable-threads=posix --enabel-__cxa_atexit --enable-languages=c,c++ \
+	 --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ \
 	 --disable-libstdcxx-pch >../$(DIR)-$@.log 2>&1
 #
 #==Status Messages==========================================
@@ -120,7 +108,7 @@
 	'cd $(ROOT) && make ch-$(NM) $(chbash-pre-bash)'
 
 stage2: Makefile $(FILE) $(PATCH1) $(PATCH3)
-	$(std_build)
+	$(sep_dir_build)
 
 compile-stage2:
 	$(call echo_message, Configuring)

Modified: x86/trunk/scripts/functions
===================================================================
--- x86/trunk/scripts/functions	2005-07-18 12:21:35 UTC (rev 372)
+++ x86/trunk/scripts/functions	2005-07-19 02:54:34 UTC (rev 373)
@@ -1,9 +1,10 @@
 #==============================================================================
 # Functions for use in the LiveCD Makefiles
 #
-# Author: Jeremy Huntwork
+# Authors: Jeremy Huntwork, Alexander Patrakov
 # Date  : 2005-07-17
 #==============================================================================
+
 define echo_message
 	@echo $(BRW)
 	@echo ===========================================================
@@ -22,9 +23,13 @@
         @touch $@
 endef
 
-define sep_dir
-	@if [ -d ../$(NM)-build ] ; then rm -rf ../$(NM)-build ; fi
-	@mkdir ../$(NM)-build && cd ../$(NM)-build
+define sep_dir_build
+	@unpack $(FILE)
+	@rm -rf $(NM)-build
+	@mkdir $(NM)-build
+	@$(MAKE) -C $(NM)-build -f ../Makefile compile-$@
+	@$(MAKE) clean
+	@touch $@
 endef
 
 # This takes the form of 'download [filename] [url] [sha1sum]'
@@ -32,8 +37,11 @@
 	@cd $(SRC) ; if [ ! -f $(1) ] ; then $(WGET) $(2) ; \
 	 elif ! echo "$(3)  $(SRC)/$(1)" | sha1sum -c - >/dev/null 2>/dev/null ; then \
 	 $(WGET) -c $(2) ; fi
-	@if echo "$(3)  $(SRC)/$(1)" | sha1sum -c - >/dev/null 2/dev/null ; then \
+	@if echo "$(3)  $(SRC)/$(1)" | sha1sum -c - >/dev/null 2>/dev/null ; then \
 	 echo $(BRW)sha1sum check on $(SRC)/$(1): $(GREEN)[ OK ]$(WHITE); \
 	 else echo $(BRW)sha1sum check on $(SRC)/$(1): $(RED)[ FAILED ]$(WHITE); fi
 	@ln -s $(SRC)/$(1) .
 endef
+
+%.gz %.tgz %.bz2 %.zip %.patch:
+	$(call download,$@,$(URL-$@),$(SHA-$@))




More information about the livecd mailing list