# Runs the makefigs program. # Last edited on 2025-05-07 17:45:05 by stolfi SHELL := /bin/bash PROG := toposlice_figs PROGDIR := .. .PHONY:: \ all debug \ depend \ depend-tests build-tests do-build-tests check \ clean clean-tests all: check # include ${STOLFIHOME}/programs/c/GENERIC-PROGS-TEST.make ifeq "/${PROGS}" "/" PROGS := ${PROG} endif ifneq "/${PROGS}" "/" ifneq "/${PROGDIR}" "/" # ---------------------------------------------------------------------- # Locations of imported packages # Location of Stolfi's headers and libraries: JS_PUB_DIR := .. JS_LIB_DIR := ${JS_PUB_DIR}/lib/ JS_INC_DIR := ${JS_PUB_DIR}/include #--------------------------------------------------------------------- # Default target for "make" with no target: all: check TAG := fig COLOROPS := -color # COLOROPS := -gray .PHONY:: make-eps make-pdf show-pdf # all: clean make-eps make-pdf all: clean make-eps make-pdf show-pdf OUTPREFIX := out/${TAG} ###################################################################### SHOWPDF := evince DUMMYEPS := .dummy.eps DUMMYPDF := .dummy.pdf make-pdf: ${DUMMYPDF} ${DUMMYEPS}: ${PROGDIR}/${PROG} ${PROGDIR}/${PROG} /bin/touch ${DUMMYEPS} ${DUMMYPDF}: ${DUMMYEPS} for efile in ${OUTPREFIX}*.eps; do \ ps2pdf \ -dEmbedAllFonts=true \ -dEPSCrop \ $${efile} $${efile/.eps/.pdf} ; \ done show-pdf: ${DUMMYEPS} for pfile in ${OUTPREFIX}*.pdf; do \ ${SHOWPDF} $$pfile ; \ done ####################################################################### # "make build" and "make build-progs" make sure that the # executables in ${PROGDIR} are up to date: build: build-progs build-tests: build-progs PROG_XFILES := ${addprefix ${PROGDIR}/, ${PROGS}} build-progs: ${PROG_XFILES} ${PROG_XFILES}: \ ${wildcard ${PROGDIR}/*.h ${PROGDIR}/*.c} \ ${wildcard ${JS_INC_DIR}/*.ho} \ ${wildcard ${JS_LIB_DIR}/*.a ${JS_LIB_DIR}/*.so} @echo "rebuilding ${PROG_XFILES} ..." cd ${PROGDIR}/. && ${MAKE} all ###################################################################### # Cleanup clean:: -/bin/rm -f ${DUMMYEPS} ${DUMMYPDF} ${OUTPREFIX}*.eps ${OUTPREFIX}*.pdf core ####################################################################### # "make debug" prints some debugging info: debug: @echo "PROG = ${PROG}" @echo "PROGS = ${PROGS}" @echo "PROG_DIR = ${PROG_DIR}" endif endif