Reordered makefile_functions.

This commit is contained in:
Manuel Canales Esparcia 2006-11-12 12:10:25 +00:00
parent ca6b2614cb
commit 1f81129de6
3 changed files with 42 additions and 27 deletions

View file

@ -69,7 +69,7 @@ ${THIS_SCRIPT}: ${PREV_SCRIPT}
@\$(call echo_message, Building)
@./progress_bar.sh \$@ \$\$PPID &
@\$(call remove_existing_dirs2,${PKG_FILE})
@\$(call unpack3,${PKG_FILE})
@\$(call unpack2,${PKG_FILE})
@\$(call get_pkg_root2)
@( time { source envars && /\$(SCRIPT_ROOT)/custom-commands/scripts/${THIS_SCRIPT} >>logs/${THIS_SCRIPT} 2>&1 ; } ) 2>>logs/${THIS_SCRIPT}
@\$(call remove_build_dirs2,${PKG})

View file

@ -162,7 +162,7 @@ EOF
fi
(
cat << EOF
@\$(call unpack3,$FILE)
@\$(call unpack2,$FILE)
@\$(call get_pkg_root2)
EOF
) >> $MKFILE.tmp

View file

@ -16,6 +16,8 @@ REVERSE = ""
tab_ = " "
nl_ = ""
#==== BUILD MESSAGES ===
define echo_PHASE
@clear
@echo $(BOLD)--------------------------------------------------------------------------------
@ -52,6 +54,11 @@ define echo_message
@echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)$(WHITE)
endef
#=======================
#=== BUILD FUNCTIONS ===
define remove_existing_dirs
@PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \
ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \
@ -66,25 +73,19 @@ define remove_existing_dirs2
rm -rf $(SRC)/$${ROOT%-*}-build
endef
define remove_build_dirs
@ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \
rm -rf $(SRCSDIR)/$$ROOT && \
rm -rf $(SRCSDIR)/$(1)-build
#==#
define unpack
@cd $(SRCSDIR) && \
tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
endef
define remove_build_dirs2
@ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \
rm -rf $(SRC)/$$ROOT && \
rm -rf $(SRC)/$(1)-build
define unpack2
@cd $(SRC) && \
tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
endef
define housekeeping
@touch $@ && \
sleep .25 && \
echo -e "\n" $(BOLD)Target $(BLUE)$@ $(WHITE)$(BOLD)OK && \
echo --------------------------------------------------------------------------------$(WHITE)
endef
#==#
define get_pkg_root
@ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \
@ -106,21 +107,35 @@ define get_pkg_root_LUSER
echo "export PKGDIR=$(SRCSDIR)/$$ROOT" > envars
endef
define unpack
@cd $(SRCSDIR) && \
tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
#==#
define remove_build_dirs
@ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \
rm -rf $(SRCSDIR)/$$ROOT && \
rm -rf $(SRCSDIR)/$(1)-build
endef
define unpack2
@cd $(SRCSDIR) && \
/tools/bin/tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
define remove_build_dirs2
@ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \
rm -rf $(SRC)/$$ROOT && \
rm -rf $(SRC)/$(1)-build
endef
define unpack3
@cd $(SRC) && \
tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST)
#==#
define housekeeping
@touch $@ && \
sleep .25 && \
echo -e "\n" $(BOLD)Target $(BLUE)$@ $(WHITE)$(BOLD)OK && \
echo --------------------------------------------------------------------------------$(WHITE)
endef
#=======================
#==== FINAL MESSAGES ===
define echo_report
@echo
@echo $(BOLD) The report file $(BLUE)$(1)$(BOLD) has been created