diff --git a/Makefile b/Makefile index 11c4b54..9af4fcd 100644 --- a/Makefile +++ b/Makefile @@ -184,9 +184,11 @@ install_for_ubuntu: sudo mv pandoc-crossref.1 /usr/local/man/man1 ; \ fi ; \ echo "which pandoc-crossref: `which pandoc-crossref`" ; \ - echo "Installing other dependencies..." ; \ - pip install --upgrade pip ; \ - pip install -r requirements.txt ; + if [ ! -f requirements.txt ]; then \ + echo "pip installing other dependencies..." ; \ + pip install --upgrade pip ; \ + pip install -r requirements.txt ; + fi ; $(PRINT) "make $@ done." install_for_mac: @@ -205,8 +207,8 @@ install_for_mac: fi ; \ echo "which pdflatex: `which pdflatex`" ; \ if [ ! -f /usr/local/bin/pandoc ]; then \ - wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-macOS.pkg ; \ echo "Installing pandoc..." ; \ + wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-macOS.pkg ; \ sudo installer -pkg pandoc-2.13-macOS.pkg -target / ; \ fi ; \ echo "which pandoc: `which pandoc`" ; \ @@ -219,36 +221,42 @@ install_for_mac: sudo chmod a+x /usr/local/bin/pandoc-crossref ; \ fi ; \ echo "which pandoc-crossref: `which pandoc-crossref`" ; \ - echo "Installing other dependencies..." ; \ - pip install --upgrade pip ; \ - pip install -r requirements.txt ; + if [ ! -f requirements.txt ]; then \ + echo "pip installing other dependencies..." ; \ + pip install --upgrade pip ; \ + pip install -r requirements.txt ; + fi ; $(PRINT) "make $@ done." install_for_windows: @echo "Installing for windows..." ; \ choco install wget ; \ - wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe ; \ - ./install-tl-windows.exe -gui text ; \ - echo "which pdflatex: `which pdflatex`" ; + if [ ! -f /usr/local/bin/pdflatex ]; then \ + echo "Installing texlive..." ; \ + wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-windows.exe ; \ + cmd /u /c "install-tl-windows.exe -no-gui" ; \ + fi ; \ + echo "which pdflatex: `which pdflatex`" ; \ + if [ ! -f /usr/local/bin/pandoc ]; then \ + echo "Installing pandoc..." ; \ + wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-windows-x86_64.zip ; \ + cmd /u /c "unzip pandoc-2.13-windows-x86_64.zip" + sudo installer -pkg pandoc-2.13-macOS.pkg -target / ; \ + fi ; \ + echo "which pandoc: `which pandoc`" ; \ + pandoc --version ; \ + if [ ! -f /usr/local/bin/pandoc-crossref ]; then \ + echo "Installing pandoc-crossref..." ; \ + wget -c https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.10.0a/pandoc-crossref-Windows.7z ; \ + tar -xf pandoc-crossref-macOS.tar.xz ; \ + sudo mv pandoc-crossref /usr/local/bin/ ; \ + sudo chmod a+x /usr/local/bin/pandoc-crossref ; \ + fi ; \ + echo "which pandoc-crossref: `which pandoc-crossref`" ; \ + if [ ! -f requirements.txt ]; then \ + echo "pip installing other dependencies..." ; \ + pip install --upgrade pip ; \ + pip install -r requirements.txt ; + fi ; $(PRINT) "make $@ done." -# if [ ! -f /usr/local/bin/pandoc ]; then \ -# wget https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-windows-x86_64.zip ; \ -# echo "Installing pandoc..." ; \ -# sudo installer -pkg pandoc-2.13-macOS.pkg -target / ; \ -# fi ; \ -# echo "which pandoc: `which pandoc`" ; \ -# pandoc --version ; \ -# if [ ! -f /usr/local/bin/pandoc-crossref ]; then \ -# echo "Installing pandoc-crossref..." ; \ -# wget -c https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.10.0a/pandoc-crossref-Windows.7z ; \ -# tar -xf pandoc-crossref-macOS.tar.xz ; \ -# sudo mv pandoc-crossref /usr/local/bin/ ; \ -# sudo chmod a+x /usr/local/bin/pandoc-crossref ; \ -# fi ; \ -# echo "which pandoc-crossref: `which pandoc-crossref`" ; \ -# echo "Installing other dependencies..." ; \ -# pip install --upgrade pip ; \ -# pip install -r requirements.txt ; -# $(PRINT) "make $@ done." -