2023-04-23 01:18:24 +02:00
|
|
|
WIKIDIRECTORY=polonius.wiki
|
|
|
|
WIKIUPSTREAM=https://github.com/rail5/polonius.wiki.git
|
2023-08-14 23:17:46 +02:00
|
|
|
VERSION=$$(dpkg-parsechangelog -l debian/changelog --show-field version)
|
2023-04-23 01:18:24 +02:00
|
|
|
|
2023-04-10 07:17:05 +02:00
|
|
|
all: update-version reader editor curses
|
|
|
|
|
|
|
|
update-version:
|
|
|
|
# Read the latest version number from debian/changelog
|
|
|
|
# And update shared/version.h with that number
|
2023-04-10 09:49:06 +02:00
|
|
|
# This ensures that the output of --version
|
2023-04-10 07:17:05 +02:00
|
|
|
# For each of the binaries is always up-to-date
|
2024-02-03 18:24:49 +01:00
|
|
|
@ \
|
|
|
|
if [ "$(VERSION)" != "" ]; then \
|
|
|
|
echo "#define program_version \"$(VERSION)\"" > shared/version.h; \
|
|
|
|
echo "$(VERSION)"; \
|
|
|
|
fi;
|
2023-04-10 07:17:05 +02:00
|
|
|
|
2023-04-23 01:18:24 +02:00
|
|
|
manual:
|
|
|
|
# Git pull wiki & run pandoc to create manual pages
|
|
|
|
# You must have Git and Pandoc installed for this
|
|
|
|
@ \
|
|
|
|
if [ -d "$(WIKIDIRECTORY)" ]; then \
|
|
|
|
cd "$(WIKIDIRECTORY)" && git pull "$(WIKIUPSTREAM)"; \
|
|
|
|
else \
|
|
|
|
git clone "$(WIKIUPSTREAM)" "$(WIKIDIRECTORY)"; \
|
|
|
|
fi;
|
|
|
|
pandoc --standalone --to man "$(WIKIDIRECTORY)/Polonius-Editor.md" -o debian/polonius-editor.1
|
|
|
|
pandoc --standalone --to man "$(WIKIDIRECTORY)/Polonius-Reader.md" -o debian/polonius-reader.1
|
|
|
|
|
2023-03-07 19:12:20 +01:00
|
|
|
reader:
|
2023-03-09 00:05:08 +01:00
|
|
|
cd read && $(MAKE)
|
2023-03-09 00:09:49 +01:00
|
|
|
mv read/bin/polonius-reader ./
|
2023-03-07 19:12:20 +01:00
|
|
|
|
|
|
|
editor:
|
2023-03-09 00:05:08 +01:00
|
|
|
cd edit && $(MAKE)
|
2023-03-09 00:09:49 +01:00
|
|
|
mv edit/bin/polonius-editor ./
|
2023-03-07 19:12:20 +01:00
|
|
|
|
2023-04-03 21:55:19 +02:00
|
|
|
curses:
|
2023-04-03 21:46:00 +02:00
|
|
|
cd cli && $(MAKE)
|
2023-04-03 21:55:19 +02:00
|
|
|
mv cli/bin/polonius ./
|
2023-04-03 21:46:00 +02:00
|
|
|
|
2023-03-27 08:11:50 +02:00
|
|
|
install:
|
|
|
|
install -m 0755 polonius-reader /usr/bin
|
|
|
|
install -m 0755 polonius-editor /usr/bin
|
|
|
|
|
2023-03-07 19:12:20 +01:00
|
|
|
clean:
|
2023-03-09 00:09:49 +01:00
|
|
|
rm -f ./polonius-reader
|
2023-03-09 00:05:08 +01:00
|
|
|
cd read && $(MAKE) clean
|
2023-03-09 00:09:49 +01:00
|
|
|
rm -f ./polonius-editor
|
2023-03-09 00:05:08 +01:00
|
|
|
cd edit && $(MAKE) clean
|
2023-04-03 21:46:00 +02:00
|
|
|
rm -f ./polonius
|
|
|
|
cd cli && $(MAKE) clean
|