aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-12-20 09:53:31 +0000
committermerakor <cem@ckyln.com>2020-12-20 09:53:31 +0000
commit7722519b9e9f47b61243cf591abdc614f53c27df (patch)
treea83a35386d71a3b47756ae2409e4022a8e000dcd
parentb38c7fd3760994ef8321c8d807b4ebca9a674d0a (diff)
downloadcpt-7722519b9e9f47b61243cf591abdc614f53c27df.tar.gz
update redo files
FossilOrigin-Name: 1096355ead3f8b366f9cf1428369d38cc9735d78da31e8fcfbb3c7ce046d1db0
-rw-r--r--all.do2
-rw-r--r--clean.do4
-rw-r--r--config.rc2
-rw-r--r--default.do29
-rw-r--r--dist.do3
-rw-r--r--docs/default.do24
6 files changed, 45 insertions, 19 deletions
diff --git a/all.do b/all.do
deleted file mode 100644
index 60dfc91..0000000
--- a/all.do
+++ /dev/null
@@ -1,2 +0,0 @@
-. ./config.rc
-redo-ifchange bin/all doc/cpt.info
diff --git a/clean.do b/clean.do
index 389daf3..b30f907 100644
--- a/clean.do
+++ b/clean.do
@@ -1,5 +1,5 @@
. ./config.rc
-redo bin/clean
+redo bin/clean src/clean
redo_clean
rm -f "cpt-$VERSION.tar.xz"
-find doc -name '*.info' -exec rm -f -- {} +
+find docs -name '*.info' -exec rm -f -- {} +
diff --git a/config.rc b/config.rc
index d1b2281..b6dc81e 100644
--- a/config.rc
+++ b/config.rc
@@ -38,7 +38,7 @@ PHONY() {
trap 'case " $PHONY " in *" $1 "*) rm -f $3; esac' EXIT INT
}
-setv VERSION = 5.1.0
+setv VERSION = 5.1.1
# Paths
setv PREFIX = /usr/local
diff --git a/default.do b/default.do
index 2d091c6..d8c1cd9 100644
--- a/default.do
+++ b/default.do
@@ -4,6 +4,15 @@
fn="${1%.*}"
case "$1" in
+ all) redo-ifchange src/cpt-lib bin/all docs/cpt.info ;;
+ dist)
+ redo clean
+ redo "cpt-$VERSION.tar.xz"
+ ;;
+ src/cpt-lib)
+ redo-ifchange "$1.in"
+ sed "s|@VERSION@|$VERSION|g" < "$1.in" > "$3"
+ ;;
bin/cpt-readlink|bin/cpt-stat)
redo-ifchange "$1.o"
"$CC" -o "$3" $LDFLAGS "$1.o" $LIBS
@@ -13,18 +22,8 @@ case "$1" in
redo-ifchange "$fn.c"
"$CC" -c -o "$3" $CFLAGS "$fn.c"
;;
- *.info)
- redo-ifchange "$fn.texi"
- $MAKEINFO "$fn.texi" -o "$3"
- ;;
- *.texi)
- [ -f "$fn.org" ] || exit 99
- redo-ifchange "$fn.org"
- $EMACS "$fn.org" --batch -f org-texinfo-export-to-texinfo
- mv "$1" "$3"
- ;;
"cpt-$VERSION.tar.xz")
- redo doc/cpt.info
+ redo docs/cpt.info
rm -rf -- "cpt-$VERSION"
find . -type f ! -name '.*' ! -path './.*' |
while read -r file; do
@@ -36,7 +35,15 @@ case "$1" in
rm -rf -- "cpt-$VERSION"
mv "$1" "$3"
;;
+ test)
+ redo src/test
+ ;;
+ src/clean)
+ rm -f src/cpt-lib
+ ;;
*)
echo "Unknown target $1"
exit 99
esac
+
+PHONY all dist test clean src/clean
diff --git a/dist.do b/dist.do
deleted file mode 100644
index c7f21f1..0000000
--- a/dist.do
+++ /dev/null
@@ -1,3 +0,0 @@
-. ./config.rc
-redo clean
-redo "cpt-$VERSION.tar.xz"
diff --git a/docs/default.do b/docs/default.do
new file mode 100644
index 0000000..2742edb
--- /dev/null
+++ b/docs/default.do
@@ -0,0 +1,24 @@
+. ../config.rc
+
+# Extensionless name of file
+fn="${1%.*}"
+
+case "$1" in
+ all) redo-ifchange info ;;
+ info) redo-ifchange cpt.info ;;
+ *.info)
+ redo-ifchange "$fn.texi"
+ $MAKEINFO "$fn.texi" -o "$3"
+ ;;
+ *.texi)
+ [ -f "$fn.org" ] || exit 99
+ redo-ifchange "$fn.org"
+ $EMACS "$fn.org" --batch -f org-texinfo-export-to-texinfo
+ mv "$1" "$3"
+ ;;
+ *)
+ echo "Unknown target $1"
+ exit 99
+esac
+
+PHONY all info html