Released as 20241122 ('Ahoo Daryaei')
[parallel.git] / Makefile.am
blob17e59a3d698ef8b51583e61d12108d46192fc28d
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 tortest:
11         torsocks ssh -t tortest 'export SSH_AUTH_SOCK=`cat ~/.ssh/SSH_AUTH_SOCK`;\
12                                  export SSH_AGENT_PID=`cat ~/.ssh/SSH_AGENT_PID`;\
13                                  cd privat/parallel/testsuite/ &&\
14                                    make short && make long && make mem'
15         make torresults
17 torresults:
18         torsocks rsync -Hazv --progress tortest:privat/parallel/testsuite/actual-results/ testsuite/actual-results/
21 torsync:
22         torsocks rsync -Hazv --exclude='*.{pdf,gz,bz2,html,deb}' --exclude authorized_keys --exclude .vagrant/ --exclude actual-results --exclude '*hwdep*' --delete ./ tortest:privat/parallel/
23         make tortest
25 web:
26         cd src; make web
27         cp -r src/*.pdf src/sphinx/build/html/* ../parallel-web/parallel
28         cp ../parallel-web/parallel/parallel.html  ../parallel-web/parallel/man.html
30 sig:
31         eval `gpg-agent --daemon`
32 # make sure $YYYYMMDD is set
33         echo $(YYYYMMDD) | grep 20
34         cp parallel-$(YYYYMMDD).tar.bz2 parallel-latest.tar.bz2
35         cp doc/parallel.directive parallel-$(YYYYMMDD).tar.bz2.directive
36         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-*.tar.*directive
37         gpg --clearsign --yes parallel-$(YYYYMMDD).tar.bz2.directive
39         cp doc/parallel.latest.directive parallel-latest.tar.bz2.directive
40         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-latest.tar.*directive
41         gpg --clearsign --yes parallel-latest.tar.bz2.directive
43         (echo '#!/bin/bash'; \
44          echo; \
45          echo "# To check the signature run:"; \
46          echo "#   echo | gpg"; \
47          echo "#   gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig"; \
48          echo; \
49          echo "echo | gpg 2>/dev/null"; \
50          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
51          echo 'exit $$?' ; \
52          echo; \
53          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
54         ) > parallel-$(YYYYMMDD).tar.bz2.sig
55         chmod +x parallel-$(YYYYMMDD).tar.bz2.sig
57         (echo '#!/bin/bash'; \
58          echo; \
59          echo "# To check the signature run:"; \
60          echo "#   echo | gpg"; \
61          echo "#   gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig"; \
62          echo; \
63          echo "echo | gpg 2>/dev/null"; \
64          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
65          echo 'exit $$?' ; \
66          echo; \
67          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
68         ) > parallel-latest.tar.bz2.sig
69         chmod +x parallel-latest.tar.bz2.sig
70         make checksig
72 checksig:
73 # gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig
74 # gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig
75         ./parallel-latest.tar.bz2.sig
76         ./parallel-$(YYYYMMDD).tar.bz2.sig
78 upload: sig
79         lftp --version
80         p=`echo parallel-latest.tar.bz2*{,.sig,.asc}`; lftp -e "put $$p; bye" ftp://anonymous:ole=tange.dk@ftp-upload.gnu.org/incoming/ftp/ || true
81         p=`echo parallel-$(YYYYMMDD).tar.bz2*{,.sig,.asc}`; lftp -e "put $$p; bye" ftp://anonymous:ole=tange.dk@ftp-upload.gnu.org/incoming/ftp/ || true
83 # This can take 7 minutes
84         pushd /tmp; \
85         rm -rf /tmp/parallel-$(YYYYMMDD)*; \
86         while ! wget https://ftp.gnu.org/gnu/parallel/parallel-$(YYYYMMDD).tar.bz2 ; do sleep 10; done; \
87         tar xjvf parallel-$(YYYYMMDD).tar.bz2; \
88         cd parallel-$(YYYYMMDD); \
89         ./configure; \
90         make -j && sudo make -j install; \
91         pushd; \
92         sudo cp /usr/local/bin/parallel /usr/local/bin/parallel-$(YYYYMMDD)
94 alphaupload:
95 # Copy of upload
96         eval `gpg-agent --daemon`
97 # make sure $YYYYMMDD is set
98         echo $(YYYYMMDD) | grep 20
99         cp parallel-$(YYYYMMDD).tar.bz2 parallel-latest.tar.bz2
100         cp doc/parallel.directive parallel-$(YYYYMMDD).tar.bz2.directive
101         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-*.tar.*directive
102         gpg --clearsign --yes parallel-$(YYYYMMDD).tar.bz2.directive
104         cp doc/parallel.latest.directive parallel-latest.tar.bz2.directive
105         perl -i -pe "s/20\d\d\d\d\d\d/$(YYYYMMDD)/" parallel-latest.tar.*directive
106         gpg --clearsign --yes parallel-latest.tar.bz2.directive
108         (echo '#!/bin/bash'; \
109          echo; \
110          echo "# To check the signature run:"; \
111          echo "#  echo | gpg"; \
112          echo "#  gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig"; \
113          echo; \
114          echo "echo | gpg 2>/dev/null"; \
115          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
116          echo 'exit $$?' ; \
117          echo; \
118          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
119         ) > parallel-$(YYYYMMDD).tar.bz2.sig
121         (echo '#!/bin/bash'; \
122          echo; \
123          echo "# To check the signature run:"; \
124          echo "#  echo | gpg"; \
125          echo "#  gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig"; \
126          echo; \
127          echo "echo | gpg 2>/dev/null"; \
128          echo 'gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve $$0'; \
129          echo 'exit $$?' ; \
130          echo; \
131          gpg -ab -o - parallel-$(YYYYMMDD).tar.bz2; \
132         ) > parallel-latest.tar.bz2.sig
134         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-latest.tar.bz2.sig
135         gpg --auto-key-locate keyserver --keyserver-options auto-key-retrieve parallel-$(YYYYMMDD).tar.bz2.sig
137         ../ftpsync/src/ftpsync parallel-$(YYYYMMDD).tar.bz2{,.sig,*asc} ftp://ftp-upload.gnu.org/incoming/alpha/
139 # This can take 7 minutes
140         pushd /tmp; \
141         rm -rf /tmp/parallel-$(YYYYMMDD)*; \
142         while ! wget http://alpha.gnu.org/gnu/parallel/parallel-$(YYYYMMDD).tar.bz2 ; do sleep 2; done; \
143         tar xjvf parallel-$(YYYYMMDD).tar.bz2; \
144         cd parallel-$(YYYYMMDD); \
145         ./configure; \
146         make -j && sudo make -j install; \
147         pushd; \
148         sudo cp /usr/local/bin/parallel /usr/local/bin/parallel-$(YYYYMMDD)
150 monitorman:
151 # If man page changed: open new pdfman
152         inotifywait -qmre MOVED_TO -e CLOSE_WRITE --format %w%f . | parallel -uj1 'echo {=/\.pod$$/ or skip()=};make -j && sudo make install; pdfman {/.} &'
154 reuse:
155         rm -rf /tmp/reuse
156         mkdir /tmp/reuse
157         git commit -a -m dummy
158         (wd=`pwd`; \
159         cd /tmp/reuse; \
160         git clone "$$wd"; \
161         cd parallel; \
162         reuse lint || \
163         (echo Use; \
164         echo '  reuse addheader --copyright="Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc." --license="GPL-3.0-or-later" source-files'; \
165         echo or; \
166         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' \
167         ) )
168         git reset HEAD~ >/dev/null
169         git commit -c ORIG_HEAD >/dev/null
171 testurls:
172         mkdir -p urls
173         cd urls && ../src/testurls
175 reconf:
176         rm -fr autom4te.cache aclocal.m4 config.h config.h.in config.log Makefile.in missing install-sh
177         rm -rf src/Makefile.in
178         autoreconf --install -W gnu
179         ./configure
180         make -j
181         sudo make install
183 pack_unpack_and_test_build:
184         echo '### Building tar.bz2'
185         ./configure
186         make dist
187         make dist-bzip2
188         echo "### Unpack parallel-$(YYYYMMDD).tar.bz2"
189         cp parallel-$(YYYYMMDD).tar.bz2 /tmp
190         cd /tmp && \
191         tar xjf parallel-$(YYYYMMDD).tar.bz2 && \
192         cd parallel-$(YYYYMMDD) && \
193         ./configure && make -j && sudo make -j install
195 # This ought to be correct, but fails on Centos
196 # bashcompletiondir=$(DESTDIR)${datarootdir}/bash-completion/completions
197 # zshcompletiondir=$(DESTDIR)${datarootdir}/zsh/site-functions
198 bashcompletiondir=$(DESTDIR)${prefix}/share/bash-completion/completions
199 zshcompletiondir=$(DESTDIR)${prefix}/share/zsh/site-functions
200 bashcompletion=${bashcompletiondir}/parallel
201 zshcompletion=${zshcompletiondir}/_parallel
202 install-data-hook:
203         mkdir -p ${zshcompletiondir} ${bashcompletiondir}
204         $(DESTDIR)$(bindir)/parallel --shell-completion bash > ${bashcompletion}
205 # Make zsh eval the --shell-completion code dynamically so if
206 # a newer version of GNU Parallel is installed by a normal
207 # user, this newer version will generate the
208 # --shell-completion code.
209         echo '#compdef parallel' > ${zshcompletion}
210         echo '(( $$+functions[_comp_parallel] )) ||' >> ${zshcompletion}
211         echo '  eval "$$(parallel --shell-completion auto)" &&' >> ${zshcompletion}
212         echo '  _comp_parallel' >> ${zshcompletion}
214 uninstall-hook:
215         rm -rf ${zshcompletiondir} ${bashcompletiondir}
217 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