Skip to content

Commit abda5d4

Browse files
committed
refactor: sort file extensions in alphabetical order where possible
1 parent b768dab commit abda5d4

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

Makefile

+23-22
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# MIT License
99
#
10-
# Copyright (c) 2018-2024 Takahiro Ueda
10+
# Copyright (c) 2018-2025 Takahiro Ueda
1111
#
1212
# Permission is hereby granted, free of charge, to any person obtaining a copy
1313
# of this software and associated documentation files (the "Software"), to deal
@@ -43,7 +43,7 @@ Targets
4343
all-recursive:
4444
Build all documents in the source tree.
4545

46-
dvi, ps, pdf, eps, svg, jpg, png:
46+
dvi, eps, jpg, pdf, png, ps, svg:
4747
Build all documents with the specified file format in the current directory.
4848

4949
help:
@@ -77,8 +77,8 @@ endef
7777
# The default target of this Makefile tries to create this type of files from
7878
# all *.tex:
7979
# - dvi
80-
# - ps
8180
# - pdf (default)
81+
# - ps
8282
default_target = pdf
8383

8484
# The toolchain for typesetting:
@@ -248,7 +248,7 @@ CL_WARN = [35m
248248
CL_ERROR = [31m
249249

250250
.SUFFIXES:
251-
.SUFFIXES: .log .bb .xbb .pdf .odt .eps .ps .jpg .png .svg .dvi .fmt .tex .cls .sty .ltx .dtx
251+
.SUFFIXES: .log .bb .xbb .jpg .png .pdf .odt .eps .ps .svg .dvi .fmt .cls .sty .tex .dtx .ltx
252252

253253
DEPDIR = .dep
254254
DIFFDIR = .diff
@@ -850,26 +850,26 @@ mostlycleanfiles_impl = $(wildcard $(strip \
850850
$(srctexfiles:.tex=-figure*.md5) \
851851
$(srctexfiles:.tex=-figure*.pdf) \
852852
$(srctexfiles:.tex=-diff.dvi) \
853-
$(srctexfiles:.tex=-diff.ps) \
854853
$(srctexfiles:.tex=-diff.pdf) \
854+
$(srctexfiles:.tex=-diff.ps) \
855855
$(MOSTLYCLEANFILES) \
856856
))
857857

858858
# $(cleanfiles) gives all generated files to be deleted by "make clean".
859859
cleanfiles = $(call cache,cleanfiles_impl)
860860

861861
cleanfiles_impl = $(wildcard $(strip \
862-
$(srctexfiles:.tex=.tar.gz) \
863-
$(srctexfiles:.tex=.pdf) \
864-
$(srctexfiles:.tex=.ps) \
865-
$(srctexfiles:.tex=.eps) \
862+
$(srcdtxfiles:.dtx=.cls) \
863+
$(srcdtxfiles:.dtx=.sty) \
864+
$(srcltxfiles:.ltx=.fmt) \
866865
$(srctexfiles:.tex=.dvi) \
867-
$(srctexfiles:.tex=.svg) \
866+
$(srctexfiles:.tex=.eps) \
868867
$(srctexfiles:.tex=.jpg) \
868+
$(srctexfiles:.tex=.pdf) \
869869
$(srctexfiles:.tex=.png) \
870-
$(srcltxfiles:.ltx=.fmt) \
871-
$(srcdtxfiles:.dtx=.cls) \
872-
$(srcdtxfiles:.dtx=.sty) \
870+
$(srctexfiles:.tex=.ps) \
871+
$(srctexfiles:.tex=.svg) \
872+
$(srctexfiles:.tex=.tar.gz) \
873873
$(CLEANFILES) \
874874
$(mostlycleanfiles) \
875875
))
@@ -1114,29 +1114,30 @@ help:
11141114

11151115
dvi: $(target_basename:=.dvi)
11161116

1117-
ps: $(target_basename:=.ps)
1118-
11191117
eps: $(target_basename:=.eps)
11201118

1121-
svg: $(target_basename:=.svg)
1122-
11231119
jpg: $(target_basename:=.jpg)
11241120

1121+
pdf: $(target_basename:=.pdf)
1122+
11251123
png: $(target_basename:=.png)
11261124

1127-
pdf: $(target_basename:=.pdf)
1125+
ps: $(target_basename:=.ps)
1126+
1127+
svg: $(target_basename:=.svg)
11281128

11291129
dist: $(target_basename:=.tar.gz)
11301130

11311131
fmt: $(target_basename:=.fmt)
11321132

11331133
$(target_basename:=.dvi) \
1134-
$(target_basename:=.ps) \
11351134
$(target_basename:=.eps) \
1136-
$(target_basename:=.svg) \
11371135
$(target_basename:=.jpg) \
1136+
$(target_basename:=.pdf) \
11381137
$(target_basename:=.png) \
1139-
$(target_basename:=.pdf): | prerequisite
1138+
$(target_basename:=.ps) \
1139+
$(target_basename:=.svg) \
1140+
: | prerequisite
11401141

11411142
prerequisite: _prerequisite
11421143
@$(call make_for_each_subdir,$(PREREQUISITE_SUBDIRS))
@@ -1479,7 +1480,7 @@ _FORCE:
14791480
_run_testsuite:
14801481
@$(run_testsuite)
14811482

1482-
.PHONY : all all-recursive check clean dist dvi eps fmt help jpg lint mostlyclean pdf png pretty ps prerequisite postprocess svg upgrade watch _FORCE _run_testsuite
1483+
.PHONY : all all-recursive check clean dist dvi eps fmt help jpg lint mostlyclean pdf png postprocess prerequisite pretty ps svg upgrade watch _FORCE _run_testsuite
14831484

14841485
# $(call typeset,LATEX-COMMAND) tries to typeset the document.
14851486
# $(call typeset,LATEX-COMMAND,false) doesn't delete the output file on failure.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Targets
6868
Build all documents in the current directory.
6969
- `all-recursive`:
7070
Build all documents in the source tree.
71-
- `dvi`, `ps`, `pdf`, `eps`, `svg`, `jpg`, `png`:
71+
- `dvi`, `eps`, `jpg`, `pdf`, `png`, `ps`, `svg`:
7272
Build all documents with the specified file format in the current directory.
7373
- `help`:
7474
Show help message.

0 commit comments

Comments
 (0)