OSDN Git Service

BuildSystem:
authorkonablend <konablend@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 4 Mar 2009 21:28:47 +0000 (21:28 +0000)
committerkonablend <konablend@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 4 Mar 2009 21:28:47 +0000 (21:28 +0000)
- added new target: make report.help (for cvk_b).
- updated doc accordingly.
- updated doc QuickStart chapter to be clearer for novices.
- added wiki auto-posting targets which are work-in-progress

git-svn-id: svn://localhost/HandBrake/trunk@2221 b64f7644-9d1e-0410-96f1-a4d463321fa5

doc/module.defs
doc/module.rules
doc/texi/building/chapter.quickstart.texi
doc/texi/building/chapter.via.terminal.texi
doc/texi/building/command.texi
macosx/HandBrake.xcodeproj/project.pbxproj
make/include/base.rules
make/include/report.defs

index e7e4260..1697c9b 100644 (file)
@@ -46,3 +46,21 @@ MAKEINFO            = $(MAKEINFO.exe) $(MAKEINFO.flags) $(MAKEINFO.flags.$(1)) $
 XML2WIKI.exe   = python3.0 $(DOC.in/)xml2wiki.py
 XML2WIKI.flags = --toc
 XML2WIKI       = $(XML2WIKI.exe) $(XML2WIKI.flags) $(1) > $(2)
+
+###############################################################################
+
+## This section is for generating wiki docs and posting them to:
+##
+##      [REPOSITORY]/wiki/[VERSION]
+##
+## which in turn is hosted by trac export webserver:
+##
+##      http://[TRACSERVER]/HEAD/wiki/[VERSION]
+##
+
+WIKI.out/         = $(BUILD/)wiki/
+WIKI.out.version/ = $(WIKI.out/)$(HB.repo.branch)/
+
+WIKI.repo.url = $(HB.repo.root)/wiki
+
+BUILD.out += $(WIKI.out.version/)
index d4cc7b7..f86b66c 100644 (file)
@@ -31,3 +31,40 @@ $(DOC.m4.out): | $(dir $(DOC.m4.out))
 $(DOC.m4.out): $(DOC.M4.deps)
 $(DOC.m4.out): $(DOC.out/)%: $(DOC.in/)%.m4
        $(call DOC.M4,$@,$<)
+
+###############################################################################
+
+#.PHONY: wiki.post wiki.sync wiki.rm wiki.add wiki.propset wiki.clean
+
+## main target
+wiki.post: $(WIKI.out/) wiki.sync wiki.rm wiki.add wiki.propset
+
+$(WIKI.out/):
+       svn co --depth immediates $(WIKI.repo.url) $@
+       svn update --set-depth infinity $(WIKI.out.version/)
+
+## cleanup after post
+wiki.clean:
+       $(RM.exe) -fr $(WIKI.out/)
+
+wiki.sync: | $(WIKI.out.version/)
+wiki.sync: $(DOC.xml2wiki.out)
+       rsync -vrptPL --delete $^ $(WIKI.out.version/)
+
+wiki.rm:
+       @files=`svn status $(WIKI.out.version/) | grep '^!' | awk '{ print $$2 }'`; \
+       if [ -n "$$files" ]; then \
+           svn rm $$files; \
+       fi
+
+wiki.add:
+       @files=`svn status $(WIKI.out.version/) | grep '^?' | awk '{ print $$2 }'`; \
+       if [ -n "$$files" ]; then \
+           svn add $$files; \
+       fi
+
+wiki.propset:
+       find $(WIKI.out.version/) -type f -a -name "*.wiki" -print0 \
+           | xargs -0 svn propset svn:eol-style native
+       find $(WIKI.out.version/) -type f -a -name "*.wiki" -print0 \
+           | xargs -0 svn propset svn:mime-type "text/html"
index 7829087..9e18db7 100644 (file)
@@ -1,13 +1,14 @@
 @anchor{quickstart}
 @chapter QuickStart
-This chapter is for building from a terminal/shell environment in as few commands as possible. If more flexibility is required you should skip this chapter and jump to @ref{overview}.
+This chapter is for building from a terminal/shell environment in as few commands as possible. Upon completion of the following commands you should have a fresh build of @value{HB.name}. Further instructions are available beginning with @ref{overview} which describes procedures suitable for repeating builds. This chapter should be skipped by those seeking more than a minimalist build.
 
 @example
 @COMMAND.checkout{}
 ./configure --launch
+cd build/
 @end example
 
-The special option @command{--launch} selected launch mode and performs the following steps:
+The special option @command{--launch} selects launch mode and performs the following steps:
 
 @itemize
 @item assert scratch directory @file{build/} does not exist
index 4f299f1..0c323ab 100644 (file)
@@ -108,6 +108,15 @@ Clean all build output including contrib modules. Configuration is retained.
 
 @item make doc
 Build auto-generated project documentation. Various articles are produced and may be found in @file{build/doc/articles}.
+
+@item make report.help
+Print list of available makefile vars report targets.
+These reports detail var definitions and expanded values used by the build system.
+@b{For experts only}.
+
+@item make report.all
+Convenience target which aggregates all reports.
+@b{For experts only}.
 @end table
 
 @anchor{terminal.targets.general}
@@ -191,3 +200,5 @@ GCC.gcc = gcc-4.2
 ## replace optimize for 'speed' with more agressive settings
 GCC.args.O.speed = -O3 -fomit-frame-pointer -msse4.2
 @end example
+
+See also @command{make report.help} which displays a set of reports used to dump makefile vars.
index 3acddc3..4c21e98 100644 (file)
@@ -1,4 +1,4 @@
 @macro COMMAND.checkout{}
-svn checkout @value{HB.repo.url} @value{HB.acro.lower}-@value{HB.repo.branch}
-cd @value{HB.acro.lower}-@value{HB.repo.branch}
+svn checkout @value{HB.repo.url} @value{HB.acro.lower}@value{HB.repo.branch}
+cd @value{HB.acro.lower}@value{HB.repo.branch}
 @end macro
index 41272fd..856caa1 100644 (file)
                                CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)";
                                CONFIGURATION_TEMP_DIR = "$(SYMROOT)";
                                EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)";
-                               EXTERNAL_JOBS = 8;
+                               EXTERNAL_JOBS = 1;
                                EXTERNAL_METHOD = xcode;
                                EXTERNAL_PROJECT = ..;
                                GCC_DYNAMIC_NO_PIC = YES;
index fd90d77..65c0373 100644 (file)
@@ -14,3 +14,23 @@ report.var:
 ## needed for nested make (which drives each report)
 report.true:
        @true
+
+## linefeed is important
+define REPORT.help.item.global
+       @echo 'report.$(1)' | awk '{ printf("  %-21s  $(REPORT.help.$(1))\n", $$0) }'
+
+endef
+define REPORT.help.item.module
+       @echo '$($(1).name).report' | awk '{ printf("  %-21s  $(1)-scoped vars\n", $$0) }'
+
+endef
+
+REPORT.help.main = global general vars
+REPORT.help.gcc  = global gcc vars (inherited by module GCC)
+REPORT.help.var  = usage: make report.var name=VARNAME
+
+report.help:
+       @echo "  AVAILABLE MAKEFILE VARS REPORTS"
+       @echo "  ----------------------------------------------------------------"
+       $(foreach n,main gcc var,$(call REPORT.help.item.global,$n))
+       $(foreach n,$(MODULES.NAMES),$(call REPORT.help.item.module,$n))
index 7962a66..ce9c3e0 100644 (file)
@@ -57,6 +57,6 @@ endif
 ## report: var
 ##
 ifeq (var,$(REPORT))
-$(info $(call fn.PRINTVAR,$(NAME)))
+$(info $(call fn.PRINTVAR,$(name)))
 $(info )
 endif