Released as 20240222 ('Навальный')
[parallel.git] / Makefile.am
blob458742dbfed23f43b79afd2d14e88620e3ad2af0
1 # SPDX-FileCopyrightText: 2002-2022 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
3 # SPDX-License-Identifier: GPL-3.0-or-later
5 SUBDIRS = src
7 test:
8         cd testsuite; make 1
10 web:
11         cd src; make web
12         cp -r src/*.pdf src/sphinx/build/html/* ../parallel-web/parallel
13         cp ../parallel-web/parallel/parallel.html  ../parallel-web/parallel/man.html
15 upload:
16         eval `gpg-agent --daemon`
17 # make sure $YYYYMMDD is set
18         echo $(YYYYMMDD) | grep 20
19         cp parallel-$(YYYYMMDD).tar.bz2 parallel-latest.tar.bz2
20         cp doc/parallel.directive parallel-$(YYYYMMDD).tar.bz2.directive
21         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-*.tar.*directive
22         gpg --clearsign --yes parallel-$(YYYYMMDD).tar.bz2.directive
24         cp doc/parallel.latest.directive parallel-latest.tar.bz2.directive
25         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-latest.tar.*directive
26         gpg --clearsign --yes parallel-latest.tar.bz2.directive
28         (echo '#!/bin/bash'; \
29          echo; \
30          echo "# To check the signature run:"; \
31          echo "#   echo | gpg"; \
32          echo "#   gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig"; \
33          echo; \
34          echo "echo | gpg 2>/dev/null"; \
35          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
36          echo 'exit $$?' ; \
37          echo; \
38          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
39         ) > parallel-$(YYYYMMDD).tar.bz2.sig
41         (echo '#!/bin/bash'; \
42          echo; \
43          echo "# To check the signature run:"; \
44          echo "#   echo | gpg"; \
45          echo "#   gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig"; \
46          echo; \
47          echo "echo | gpg 2>/dev/null"; \
48          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
49          echo 'exit $$?' ; \
50          echo; \
51          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
52         ) > parallel-latest.tar.bz2.sig
54         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig
55         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig
57 #       "|| true" needed if already uploaded
58         p=`echo parallel-latest.tar.bz2*{,.sig,.asc}`; lftp -e "put $$p; bye" ftp://ftp-upload.gnu.org/incoming/ftp/ || true
59         p=`echo parallel-$(YYYYMMDD).tar.bz2*{,.sig,.asc}`; lftp -e "put $$p; bye" ftp://ftp-upload.gnu.org/incoming/ftp/ || true
61 # This can take 7 minutes
62         pushd /tmp; \
63         rm -rf /tmp/parallel-$(YYYYMMDD)*; \
64         while ! wget https://ftp.gnu.org/gnu/parallel/parallel-$(YYYYMMDD).tar.bz2 ; do sleep 10; done; \
65         tar xjvf parallel-$(YYYYMMDD).tar.bz2; \
66         cd parallel-$(YYYYMMDD); \
67         ./configure; \
68         make -j && sudo make -j install; \
69         pushd; \
70         sudo cp /usr/local/bin/parallel /usr/local/bin/parallel-$(YYYYMMDD)
72 alphaupload:
73 # Copy of upload
74         eval `gpg-agent --daemon`
75 # make sure $YYYYMMDD is set
76         echo $(YYYYMMDD) | grep 20
77         cp parallel-$(YYYYMMDD).tar.bz2 parallel-latest.tar.bz2
78         cp doc/parallel.directive parallel-$(YYYYMMDD).tar.bz2.directive
79         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-*.tar.*directive
80         gpg --clearsign --yes parallel-$(YYYYMMDD).tar.bz2.directive
82         cp doc/parallel.latest.directive parallel-latest.tar.bz2.directive
83         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-latest.tar.*directive
84         gpg --clearsign --yes parallel-latest.tar.bz2.directive
86         (echo '#!/bin/bash'; \
87          echo; \
88          echo "# To check the signature run:"; \
89          echo "#  echo | gpg"; \
90          echo "#  gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig"; \
91          echo; \
92          echo "echo | gpg 2>/dev/null"; \
93          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
94          echo 'exit $$?' ; \
95          echo; \
96          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
97         ) > parallel-$(YYYYMMDD).tar.bz2.sig
99         (echo '#!/bin/bash'; \
100          echo; \
101          echo "# To check the signature run:"; \
102          echo "#  echo | gpg"; \
103          echo "#  gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig"; \
104          echo; \
105          echo "echo | gpg 2>/dev/null"; \
106          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
107          echo 'exit $$?' ; \
108          echo; \
109          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
110         ) > parallel-latest.tar.bz2.sig
112         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig
113         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig
115         ../ftpsync/src/ftpsync parallel-$(YYYYMMDD).tar.bz2{,.sig,*asc} ftp://ftp-upload.gnu.org/incoming/alpha/
117 # This can take 7 minutes
118         pushd /tmp; \
119         rm -rf /tmp/parallel-$(YYYYMMDD)*; \
120         while ! wget http://alpha.gnu.org/gnu/parallel/parallel-$(YYYYMMDD).tar.bz2 ; do sleep 2; done; \
121         tar xjvf parallel-$(YYYYMMDD).tar.bz2; \
122         cd parallel-$(YYYYMMDD); \
123         ./configure; \
124         make -j && sudo make -j install; \
125         pushd; \
126         sudo cp /usr/local/bin/parallel /usr/local/bin/parallel-$(YYYYMMDD)
128 monitorman:
129 # If man page changed: open new pdfman
130         inotifywait -qmre MOVED_TO -e CLOSE_WRITE --format %w%f . | parallel -uj1 'echo {=/\.pod$$/ or skip()=};make -j && sudo make install; pdfman {/.} &'
132 reuse:
133         rm -rf /tmp/reuse
134         mkdir /tmp/reuse
135         git commit -a -m dummy
136         (wd=`pwd`; \
137         cd /tmp/reuse; \
138         git clone "$$wd"; \
139         cd parallel; \
140         reuse lint || \
141         (echo Use; \
142         echo '  reuse addheader --copyright="Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc." --license="GPL-3.0-or-later" source-files'; \
143         echo or; \
144         echo '  reuse addheader --copyright="Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc." --license="GPL-3.0-or-later" --explicit-license bin-files' \
145         ) )
146         git reset HEAD~ >/dev/null
147         git commit -c ORIG_HEAD >/dev/null
149 testurls:
150         mkdir -p urls
151         cd urls && ../src/testurls
153 reconf:
154         rm -fr autom4te.cache aclocal.m4 config.h config.h.in config.log Makefile.in missing install-sh
155         rm -rf src/Makefile.in
156         autoreconf --install -W gnu
157         ./configure
158         make -j
159         sudo make install
161 pack_unpack_and_test_build:
162         echo '### Building tar.bz2'
163         ./configure
164         make dist
165         make dist-bzip2
166         echo "### Unpack parallel-$(YYYYMMDD).tar.bz2"
167         cp parallel-$(YYYYMMDD).tar.bz2 /tmp
168         cd /tmp && \
169         tar xjf parallel-$(YYYYMMDD).tar.bz2 && \
170         cd parallel-$(YYYYMMDD) && \
171         ./configure && make -j && sudo make -j install
173 # This ought to be correct, but fails on Centos
174 # bashcompletiondir=$(DESTDIR)${datarootdir}/bash-completion/completions
175 # zshcompletiondir=$(DESTDIR)${datarootdir}/zsh/site-functions
176 bashcompletiondir=$(DESTDIR)${prefix}/share/bash-completion/completions
177 zshcompletiondir=$(DESTDIR)${prefix}/share/zsh/site-functions
178 bashcompletion=${bashcompletiondir}/parallel
179 zshcompletion=${zshcompletiondir}/_parallel
180 install-data-hook:
181         mkdir -p ${zshcompletiondir} ${bashcompletiondir}
182         $(DESTDIR)$(bindir)/parallel --shell-completion bash > ${bashcompletion}
183 # Make zsh eval the --shell-completion code dynamically so if
184 # a newer version of GNU Parallel is installed by a normal
185 # user, this newer version will generate the
186 # --shell-completion code.
187         echo '#compdef parallel' > ${zshcompletion}
188         echo '(( $$+functions[_comp_parallel] )) ||' >> ${zshcompletion}
189         echo '  eval "$$(parallel --shell-completion auto)" &&' >> ${zshcompletion}
190         echo '  _comp_parallel' >> ${zshcompletion}
192 uninstall-hook:
193         rm -rf ${zshcompletiondir} ${bashcompletiondir}
195 EXTRA_DIST = CITATION CITATION.cff CREDITS LICENSES/CC-BY-SA-4.0.txt LICENSES/GFDL-1.3-or-later.txt LICENSES/GPL-3.0-or-later.txt