aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis/make/demo-plot.mk
diff options
context:
space:
mode:
Diffstat (limited to 'reproduce/analysis/make/demo-plot.mk')
-rw-r--r--reproduce/analysis/make/demo-plot.mk28
1 files changed, 14 insertions, 14 deletions
diff --git a/reproduce/analysis/make/demo-plot.mk b/reproduce/analysis/make/demo-plot.mk
index 53e1918..13b0d45 100644
--- a/reproduce/analysis/make/demo-plot.mk
+++ b/reproduce/analysis/make/demo-plot.mk
@@ -1,7 +1,7 @@
# Second step of analysis:
# Data for plot of number/fraction of tools per year.
#
-# Copyright (C) 2020-2021 Mohammad Akhlaghi <mohammad@akhlaghi.org>
+# Copyright (C) 2020-2022 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This Makefile is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -22,16 +22,16 @@
a2mk20f1c = $(tex-publish-dir)/tools-per-year.txt
$(a2mk20f1c): $(mk20tab3) | $(tex-publish-dir)
- # Remove the (possibly) produced figure that is created from this
- # table: it is created by LaTeX's TiKZ package, and includes
- # multiple files with a fixed prefix.
+# Remove the (possibly) produced figure that is created from this
+# table: it is created by LaTeX's TiKZ package, and includes multiple
+# files with a fixed prefix.
rm -f $(tikzdir)/figure-tools-per-year*
- # Write the column metadata in a temporary file name (appending
- # '.tmp' to the actual target name). Once all steps are done, it is
- # renamed to the final target. We do this because if there is an
- # error in the middle, Make will not consider the job to be
- # complete and will stop here.
+# Write the column metadata in a temporary file name (appending
+# '.tmp' to the actual target name). Once all steps are done, it is
+# renamed to the final target. We do this because if there is an
+# error in the middle, Make will not consider the job to be complete
+# and will stop here.
echo "# Data of plot showing fraction of papers that mentioned software tools" > $@.tmp
echo "# per year to demonstrate the features of Maneage (MANaging data linEAGE)." >> $@.tmp
>> $@.tmp
@@ -48,7 +48,7 @@ $(a2mk20f1c): $(mk20tab3) | $(tex-publish-dir)
$(call print-general-metadata, $@.tmp)
- # Find the maximum number of papers.
+# Find the maximum number of papers.
awk '!/^#/{all[$$1]+=$$2; id[$$1]+=$$3} \
END{ for(year in all) \
printf("%-7d%-10.3f%d\n", year, 100*id[year]/all[year], \
@@ -56,7 +56,7 @@ $(a2mk20f1c): $(mk20tab3) | $(tex-publish-dir)
}' $< \
>> $@.tmp
- # Write it into the final target
+# Write it into the final target
mv $@.tmp $@
@@ -66,15 +66,15 @@ $(a2mk20f1c): $(mk20tab3) | $(tex-publish-dir)
# Final LaTeX macro
$(mtexdir)/demo-plot.tex: $(a2mk20f1c) $(pconfdir)/demo-year.conf
- # Find the first year (first column of first row) of data.
+# Find the first year (first column of first row) of data.
v=$$(awk '!/^#/ && c==0{c++; print $$1}' $(a2mk20f1c))
echo "\newcommand{\menkefirstyear}{$$v}" > $@
- # Find the number of rows in the plotted table.
+# Find the number of rows in the plotted table.
v=$$(awk '!/^#/{c++} END{print c}' $(a2mk20f1c))
echo "\newcommand{\menkenumyears}{$$v}" >> $@
- # Find the number of papers in 1996.
+# Find the number of papers in 1996.
v=$$(awk '$$1==$(menke-demo-year){print $$3}' $(a2mk20f1c))
echo "\newcommand{\menkenumpapersdemocount}{$$v}" >> $@
echo "\newcommand{\menkenumpapersdemoyear}{$(menke-demo-year)}" >> $@