I am trying to write a Makefile to help compiling my resume in two languages, German as well as in English.
I come to know conditional statement and tried using this following way:
# Variables Declaration
LANG = DE
rule:
ifeq ($(LANG), DE)
FILE = ./directory/resume_de
else ifeq ($(LANG), EN)
FILE = ./directory/resume_en
else
echo "LANG is not set, use DE/EN"; exit 1
endif
all: ${FILE}.pdf move
${FILE}.pdf: ${FILE}.tex
latexmk -pdf -pdflatex=${PDFLATEX} -f -use-make ${FILE}.tex
So basic idea at my end was that if LAN is DE/EN, the corresponding resume would be generated. However, it looks like that I misunderstand the concept of conditional operator in Makefile.
Could someone please comment how could I serve my purpose of using single command line to be able to work on both language resume in Makefile.
Thanks