|
30 | 30 | # |
31 | 31 | fileinfo := LaTeX Makefile |
32 | 32 | author := Chris Monson |
33 | | -version := 2.2.1-alpha10 |
| 33 | +version := 2.2.1 |
34 | 34 | # |
35 | 35 | .DEFAULT_GOAL := all |
36 | 36 | # Note that the user-global version is imported *after* the source directory, |
@@ -126,6 +126,10 @@ export LC_ALL ?= C |
126 | 126 | # |
127 | 127 | # |
128 | 128 | # CHANGES: |
| 129 | +# Chris Monson (2020-12-11): |
| 130 | +# * Fix bcf datasource collection, add some tests, thanks to k4rtik on issue 126 |
| 131 | +# Chris Monson (2018-11-28): |
| 132 | +# * Add bcf datasource collection for biber - thanks to llbit on issue 126 |
129 | 133 | # Chris Monson (2014-09-04): |
130 | 134 | # * Allow graphic dependencies in texmf directories (anything .fls knows about). |
131 | 135 | # Chris Monson (2014-02-14): |
@@ -1001,13 +1005,15 @@ cleanse-filename = $(subst .,_,$(subst /,__,$1)) |
1001 | 1005 |
|
1002 | 1006 | # Escape dots and forward slashes. |
1003 | 1007 | # $(call escape-fname-regex,str) |
1004 | | -escape-fname-regex = $(subst /,\\/,$(subst .,\\.,$1)) |
| 1008 | +escape-fname-regex = $(subst /,\/,$(subst .,\.,$1)) |
1005 | 1009 |
|
1006 | 1010 | # Test that a file exists |
1007 | 1011 | # $(call test-exists,file) |
1008 | 1012 | test-exists = [ -e '$1' ] |
1009 | 1013 | # $(call test-not-exists,file) |
1010 | 1014 | test-not-exists = [ ! -e '$1' ] |
| 1015 | +# $(call test-non-empty,file) |
| 1016 | +test-non-empty = [ -s '$1' ] |
1011 | 1017 |
|
1012 | 1018 | # $(call move-files,source,destination) |
1013 | 1019 | move-if-exists = $(call test-exists,$1) && $(MV) '$1' '$2' |
@@ -2044,6 +2050,20 @@ $(SED) \ |
2044 | 2050 | $(SORT) | $(UNIQ) |
2045 | 2051 | endef |
2046 | 2052 |
|
| 2053 | +# Outputs bcf bibs to stdout. Arg 1 is the bcf file stem, arg 2 is the |
| 2054 | +# list of targets for each dependency found. |
| 2055 | +define get-bcf-bibs |
| 2056 | +if $(call test-non-empty,$1); then \ |
| 2057 | + $(SED) \ |
| 2058 | +-e '/datasource/!d' \ |
| 2059 | +-e 's/^[^>]*>//g' \ |
| 2060 | +-e 's/<.*$$//g' \ |
| 2061 | +-e '/\.bib$$/!s/$$/.bib/' \ |
| 2062 | +-e 's!^!$2: !' \ |
| 2063 | +'$1' | $(SORT) | $(UNIQ); \ |
| 2064 | +fi |
| 2065 | +endef |
| 2066 | + |
2047 | 2067 | # Makes a an aux file that only has stuff relevant to the target in it |
2048 | 2068 | # $(call make-auxtarget-file,<flattened-aux>,<new-aux>) |
2049 | 2069 | define make-auxtarget-file |
@@ -2818,7 +2838,7 @@ endef |
2818 | 2838 | # $(call make-ps,<dvi file>,<ps file>,<log file>,[<paper size>],[<beamer info>]) |
2819 | 2839 | make-ps = \ |
2820 | 2840 | $(DVIPS) -z -o '$2' $(if $(strip $4),-t$(strip $4),) '$1' \ |
2821 | | - $(if $5,| $(enlarge_beamer)) > $3 2>&1 |
| 2841 | + $(if $(strip $5),| $(enlarge_beamer)) > $3 2>&1 |
2822 | 2842 |
|
2823 | 2843 | # Convert Postscript to PDF |
2824 | 2844 | # $(call make-pdf,<ps file>,<pdf file>,<log file>,<embed file>) |
@@ -3334,6 +3354,7 @@ endif |
3334 | 3354 | $(call get-graphics,$*) >> $*.d; \ |
3335 | 3355 | $(call get-log-index,$*,$(addprefix $*.,aux aux.make)) >> $*.d; \ |
3336 | 3356 | $(call get-bibs,$*.aux.make,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \ |
| 3357 | + $(call get-bcf-bibs,$*.bcf,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \ |
3337 | 3358 | $(EGREP) -q "# MISSING stem" $*.d && $(SLEEP) 1 && $(RM) $*.pdf; \ |
3338 | 3359 | $(EGREP) -q "# MISSING format" $*.d && $(RM) $*.pdf; \ |
3339 | 3360 | $(call move-if-exists,$*.$(build_target_extension),$*.$(build_target_extension).1st.make); \ |
|
0 commit comments