Packaged for old RedHats and SuSEs.
[parallel.git] / Makefile.am
blobe88d82d63bdcce380a5ca809e30a00c1f68a1a21
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
13 upload:
14         eval `gpg-agent --daemon`
15 # make sure $YYYYMMDD is set
16         echo $(YYYYMMDD) | grep 20
17         cp parallel-$(YYYYMMDD).tar.bz2 parallel-latest.tar.bz2
18         cp doc/parallel.directive parallel-$(YYYYMMDD).tar.bz2.directive
19         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-*.tar.*directive
20         gpg --clearsign --yes parallel-$(YYYYMMDD).tar.bz2.directive
22         cp doc/parallel.latest.directive parallel-latest.tar.bz2.directive
23         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-latest.tar.*directive
24         gpg --clearsign --yes parallel-latest.tar.bz2.directive
26         (echo '#!/bin/bash'; \
27          echo; \
28          echo "# To check the signature run:"; \
29          echo "#   echo | gpg"; \
30          echo "#   gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig"; \
31          echo; \
32          echo "echo | gpg 2>/dev/null"; \
33          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
34          echo 'exit $$?' ; \
35          echo; \
36          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
37         ) > parallel-$(YYYYMMDD).tar.bz2.sig
39         (echo '#!/bin/bash'; \
40          echo; \
41          echo "# To check the signature run:"; \
42          echo "#   echo | gpg"; \
43          echo "#   gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig"; \
44          echo; \
45          echo "echo | gpg 2>/dev/null"; \
46          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
47          echo 'exit $$?' ; \
48          echo; \
49          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
50         ) > parallel-latest.tar.bz2.sig
52         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig
53         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig
55         ../ftpsync/src/ftpsync parallel-$(YYYYMMDD).tar.bz2{,.sig,*asc} ftp://ftp-upload.gnu.org/incoming/ftp/
56         ../ftpsync/src/ftpsync parallel-latest.tar.bz2{,.sig,*asc} ftp://ftp-upload.gnu.org/incoming/ftp/
58 # This can take 7 minutes
59         pushd /tmp; \
60         rm -rf /tmp/parallel-$(YYYYMMDD)*; \
61         while ! wget https://ftp.gnu.org/gnu/parallel/parallel-$(YYYYMMDD).tar.bz2 ; do sleep 2; done; \
62         tar xjvf parallel-$(YYYYMMDD).tar.bz2; \
63         cd parallel-$(YYYYMMDD); \
64         ./configure; \
65         make -j && sudo make -j install; \
66         pushd; \
67         sudo cp /usr/local/bin/parallel /usr/local/bin/parallel-$(YYYYMMDD)
69 alphaupload:
70 # Copy of upload
71         eval `gpg-agent --daemon`
72 # make sure $YYYYMMDD is set
73         echo $(YYYYMMDD) | grep 20
74         cp parallel-$(YYYYMMDD).tar.bz2 parallel-latest.tar.bz2
75         cp doc/parallel.directive parallel-$(YYYYMMDD).tar.bz2.directive
76         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-*.tar.*directive
77         gpg --clearsign --yes parallel-$(YYYYMMDD).tar.bz2.directive
79         cp doc/parallel.latest.directive parallel-latest.tar.bz2.directive
80         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-latest.tar.*directive
81         gpg --clearsign --yes parallel-latest.tar.bz2.directive
83         (echo '#!/bin/bash'; \
84          echo; \
85          echo "# To check the signature run:"; \
86          echo "#  echo | gpg"; \
87          echo "#  gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig"; \
88          echo; \
89          echo "echo | gpg 2>/dev/null"; \
90          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
91          echo 'exit $$?' ; \
92          echo; \
93          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
94         ) > parallel-$(YYYYMMDD).tar.bz2.sig
96         (echo '#!/bin/bash'; \
97          echo; \
98          echo "# To check the signature run:"; \
99          echo "#  echo | gpg"; \
100          echo "#  gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig"; \
101          echo; \
102          echo "echo | gpg 2>/dev/null"; \
103          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
104          echo 'exit $$?' ; \
105          echo; \
106          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
107         ) > parallel-latest.tar.bz2.sig
109         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig
110         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig
112         ../ftpsync/src/ftpsync parallel-$(YYYYMMDD).tar.bz2{,.sig,*asc} ftp://ftp-upload.gnu.org/incoming/alpha/
114 # This can take 7 minutes
115         pushd /tmp; \
116         rm -rf /tmp/parallel-$(YYYYMMDD)*; \
117         while ! wget http://alpha.gnu.org/gnu/parallel/parallel-$(YYYYMMDD).tar.bz2 ; do sleep 2; done; \
118         tar xjvf parallel-$(YYYYMMDD).tar.bz2; \
119         cd parallel-$(YYYYMMDD); \
120         ./configure; \
121         make -j && sudo make -j install; \
122         pushd; \
123         sudo cp /usr/local/bin/parallel /usr/local/bin/parallel-$(YYYYMMDD)
125 monitorman:
126 # If man page changed: open new pdfman
127         inotifywait -qmre MOVED_TO -e CLOSE_WRITE --format %w%f . | parallel -uj1 'echo {=/\.pod$$/ or skip()=};make -j && sudo make install; pdfman {/.} &'
129 reuse:
130         rm -rf /tmp/reuse
131         mkdir /tmp/reuse
132         git commit -a -m dummy
133         (wd=`pwd`; \
134         cd /tmp/reuse; \
135         git clone "$$wd"; \
136         cd parallel; \
137         reuse lint || \
138         (echo Use; \
139         echo '  reuse addheader --copyright="Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc." --license="GPL-3.0-or-later" source-files'; \
140         echo or; \
141         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' \
142         ) )
143         git reset HEAD~ >/dev/null
144         git commit -c ORIG_HEAD >/dev/null
146 testurls:
147         mkdir -p urls
148         cd urls && grep -v '(dead)' ../src/* | grep -h -Po 'https?://[^ $$<>")}]+' | perl -pe 's/(&gt|\{).*//;s/\\-/-/g;s/\\n//g;s/&amp;/&/g;s/&#.*//;'"s/'.*//" | grep -Ev 'parallel-(20)?$$|coolwebsite.biz' | sort -u | egrep -v 'example.com|##|\*\(' | parallel -j0 --timeout 33 --bar --tag --joblog joblog --retries 3 neno wget -m -l1 -Q1 '{=$$_=Q($$_)=}'
150 reconf:
151         rm -fr autom4te.cache aclocal.m4 config.h config.h.in config.log Makefile.in missing install-sh
152         rm -rf src/Makefile.in
153         autoreconf --install -W gnu
154         ./configure
155         make -j
156         sudo make install
158 pack_unpack_and_test_build:
159         echo '### Building tar.bz2'
160         ./configure
161         make dist
162         make dist-bzip2
163         echo "### Unpack parallel-$(YYYYMMDD).tar.bz2"
164         cp parallel-$(YYYYMMDD).tar.bz2 /tmp
165         cd /tmp && \
166         tar xjf parallel-$(YYYYMMDD).tar.bz2 && \
167         cd parallel-$(YYYYMMDD) && \
168         ./configure && make -j && sudo make -j install
170 # This ought to be correct, but fails on Centos
171 # bashcompletiondir=$(DESTDIR)${datarootdir}/bash-completion/completions
172 # zshcompletiondir=$(DESTDIR)${datarootdir}/zsh/site-functions
173 bashcompletiondir=$(DESTDIR)${prefix}/share/bash-completion/completions
174 zshcompletiondir=$(DESTDIR)${prefix}/share/zsh/site-functions
175 bashcompletion=${bashcompletiondir}/parallel
176 zshcompletion=${zshcompletiondir}/_parallel
177 install-data-hook:
178         mkdir -p ${zshcompletiondir} ${bashcompletiondir}
179         src/parallel --shell-completion bash > ${bashcompletion}
180 # Make zsh eval the --shell-completion code dynamically so if
181 # a newer version of GNU Parallel is installed by a normal
182 # user, this newer version will generate the
183 # --shell-completion code.
184         echo '#compdef parallel' > ${zshcompletion}
185         echo '(( $$+functions[_comp_parallel] )) ||' >> ${zshcompletion}
186         echo '  eval "$$(parallel --shell-completion auto)" &&' >> ${zshcompletion}
187         echo '  _comp_parallel' >> ${zshcompletion}
189 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