Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7019197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:09:06+00:00 2026-05-27T23:09:06+00:00

I have the following part of a Makefile #.SILENT: #.PHONY: SHELL := /bin/bash ################################################################

  • 0

I have the following part of a Makefile

#.SILENT:
#.PHONY:
SHELL     := /bin/bash
################################################################
## Colordefinition
################################################################
NO_COLOR    = \x1b[0m
OK_COLOR    = \x1b[32;01m
ERROR_COLOR = \x1b[31;01m

%.pdf: %.tex
    NAME=`basename $< .tex` ;\
    echo -e "\t$(OK_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\
    pdflatex -draftmode -interaction=nonstopmode $< > /dev/null ;\
    if [ $$? = 0 ] ; then \
      echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\
      pdflatex -interaction=nonstopmode $< > /dev/null ;\
      if [ -e $$NAME.glo ] ; then \
        echo -e "$(OK_COLOR)Typesetting $$NAME.glo$(NO_COLOR)" ;\
        makeindex -s gglo.ist -o $$NAME.gls $$NAME.glo ;\
      fi ;\
      if [ -e $$NAME.idx ] ; then \
        echo -e "$(OK_COLOR)Typesetting $$NAME.idx$(NO_COLOR)" ;\
        makeinde -s gind.ist $$NAME.idx ;\
      fi ;\ 
    else \
      echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\
      exit 0;\
    fi ;\
    echo -e "\t$(OK_COLOR)Typesetting $$NAME finished $(NO_COLOR)" ;\

The makefile doens’t work and I can’t find the error.

My goal is to type:

make test.pdf

The following example can be used for testing (test.tex):

\documentclass{article}
\begin{document}
Hello World!
\end{document}

How must the Makefile improve?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:09:07+00:00Added an answer on May 27, 2026 at 11:09 pm

    You have a superfluous space after the backslash in the line 14 (fi ;\) directly before the else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following part of a function that is driving me crazy. As
I have the following class (part of it): class SearchViewModel : BaseViewModel<SearchResultItem> { private
I have the following ugly if statement that is part of a class that
I have the following string (the double quotes are part of the string): abc
I have the following code, which is run every 10ms as part of a
I have the following script, which is working for the most part Link to
as part of a script i am working on i have the following: loop
This part of an app that I am working on, I have the following
Using linkedin-j , I have the following code in one part of my application
I have a few issues with the following php functions (part of a bigger

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.