From owner-svn-src-user@FreeBSD.ORG Thu Nov 28 05:44:47 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0329493B; Thu, 28 Nov 2013 05:44:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7FC015CA; Thu, 28 Nov 2013 05:44:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAS5ikxs090367; Thu, 28 Nov 2013 05:44:46 GMT (envelope-from lwhsu@svn.freebsd.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAS5ijj9090352; Thu, 28 Nov 2013 05:44:45 GMT (envelope-from lwhsu@svn.freebsd.org) Message-Id: <201311280544.rAS5ijj9090352@svn.freebsd.org> From: Li-Wen Hsu Date: Thu, 28 Nov 2013 05:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r258701 - in user/glebius/course: . 01.intro 02.entering_kernel 03.processes&threads 04.synchronisation 05.memory 06.filedesc 07.io 08.io2 X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 05:44:47 -0000 Author: lwhsu (ports committer) Date: Thu Nov 28 05:44:44 2013 New Revision: 258701 URL: http://svnweb.freebsd.org/changeset/base/258701 Log: - Use for-loop to reduce duplicated code - Use dependency instead of directly invoking make on other target Approved by: glebius Modified: user/glebius/course/01.intro/Makefile user/glebius/course/02.entering_kernel/Makefile user/glebius/course/03.processes&threads/Makefile user/glebius/course/04.synchronisation/Makefile user/glebius/course/05.memory/Makefile user/glebius/course/06.filedesc/Makefile user/glebius/course/07.io/Makefile user/glebius/course/08.io2/Makefile user/glebius/course/Makefile Modified: user/glebius/course/01.intro/Makefile ============================================================================== --- user/glebius/course/01.intro/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/01.intro/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/02.entering_kernel/Makefile ============================================================================== --- user/glebius/course/02.entering_kernel/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/02.entering_kernel/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/03.processes&threads/Makefile ============================================================================== --- user/glebius/course/03.processes&threads/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/03.processes&threads/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/04.synchronisation/Makefile ============================================================================== --- user/glebius/course/04.synchronisation/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/04.synchronisation/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/05.memory/Makefile ============================================================================== --- user/glebius/course/05.memory/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/05.memory/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/06.filedesc/Makefile ============================================================================== --- user/glebius/course/06.filedesc/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/06.filedesc/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/07.io/Makefile ============================================================================== --- user/glebius/course/07.io/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/07.io/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/08.io2/Makefile ============================================================================== --- user/glebius/course/08.io2/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/08.io2/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -12,6 +12,5 @@ TMP= $(NAME).aux $(NAME).log $(NAME).nav clean: rm -f -- $(TMP) texput.log -cleanall: - make clean +cleanall: clean rm -f $(NAME).pdf Modified: user/glebius/course/Makefile ============================================================================== --- user/glebius/course/Makefile Wed Nov 27 23:26:54 2013 (r258700) +++ user/glebius/course/Makefile Thu Nov 28 05:44:44 2013 (r258701) @@ -1,35 +1,37 @@ -ALL: build +LECTURES= 01.intro \ + 02.entering_kernel \ + 03.processes\&threads \ + 04.synchronisation \ + 05.memory \ + 06.filedesc \ + 07.io \ + 08.io2 + +.MAIN: build build: @echo "Building individual chapters..." - cd 01.intro; make - cd 02.entering_kernel; make - cd 03.processes\&threads; make - cd 04.synchronisation; make - cd 05.memory; make + @for l in ${LECTURES}; do \ + cd $${l}; make; cd -; \ + done course: @echo "Creating combined pdf..." - pdfjoin 01.intro/lection.pdf \ - 02.entering_kernel/lection.pdf \ - 03.processes\&threads/lection.pdf \ - 04.synchronisation/lection.pdf \ - 05.memory/lection.pdf \ - -o course.pdf + @PDFS=""; \ + for l in ${LECTURES}; do \ + PDFS="$${PDFS} $${l}/lection.pdf"; \ + done; \ + pdfjoin $${PDFS} -o course.pdf clean: @echo "Cleanup temp files..." - cd 01.intro; make clean - cd 02.entering_kernel; make clean - cd 03.processes\&threads; make clean - cd 04.synchronisation; make clean - cd 05.memory; make clean + @for l in ${LECTURES}; do \ + cd $${l}; make ${.TARGET}; cd -; \ + done cleanall: @echo "Cleanup all files..." - cd 01.intro; make cleanall - cd 02.entering_kernel; make cleanall - cd 03.processes\&threads; make cleanall - cd 04.synchronisation; make cleanall - cd 05.memory; make cleanall + @for l in ${LECTURES}; do \ + cd $${l}; make ${.TARGET}; cd -; \ + done rm -f course.pdf