Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ots-doctools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
ots-doctools
Commits
520bb791
Commit
520bb791
authored
6 years ago
by
James Vasile
Browse files
Options
Downloads
Patches
Plain Diff
Add doc-specific Makefile
parent
015ffd04
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile.docspecific
+66
-0
66 additions, 0 deletions
Makefile.docspecific
with
66 additions
and
0 deletions
Makefile.docspecific
0 → 100644
+
66
−
0
View file @
520bb791
# This is a document-specific Makefile. Matters that are specific to
# this doc can be put here. More general LaTeX building targets can
# go in OTSLTXDIR/Makefile, which this one calls.
# By default, we build all .ltx files in this dir
SOURCE
=
$(
wildcard
*
.ltx
)
TARGETS
=
$(
SOURCE:.ltx
=
.pdf
)
### Try to find otsltx directory. We look in the current dir, then
### for a $OTSLTXDIR environment variable, then $OTSDIR/forms/latex,
### then ~/OTS/forms/latex, then /usr/local/src/otsltx
# If there's a local otsltx dir, use it
ifneq
("$(wildcard otsltx)","")
OTSLTXDIR
=
otsltx
else
# Otherwise maybe one's defined in the environment
ifndef
OTSLTXDIR
ifneq
("$(wildcard $(OTSDIR)/forms/latex)","")
OTSLTXDIR
=
"
$(
OTSDIR
)
/forms/latex"
else
ifneq
("$(wildcard ~/OTS/forms/latex)","")
OTSLTXDIR
=
"~/OTS/forms/latex"
else
ifneq
("$(wildcard /usr/local/src/otsltx)","")
OTSLTXDIR
=
"/usr/local/src/otsltx"
endif
endif
endif
endif
endif
# If we didn't find the OTS Latex stuff, grab it from GitHub
ifndef
OTSLTXDIR
#$(error Cannot find OTSLTX materials. Please install OTSLTX, set OTSLTXDIR, and/or put OTSLTX in this directory.)
$(shell git submodule add https
:
//github.com/OpenTechStrategies/otsltx)
OTSLTXDIR
=
otsltx
endif
all
:
DEPS ${TARGETS}
# Handle OTS dependencies
.PHONY
:
DEPS
DEPS
:
otsreport.cls ots.sty otslogo.pdf
otsreport.cls
:
$(OTSLTXDIR)/otsreport.cls
ln
-s
$(
OTSLTXDIR
)
/otsreport.cls
ots.sty
:
$(OTSLTXDIR)/ots.sty
ln
-s
$(
OTSLTXDIR
)
/ots.sty
otslogo.pdf
:
$(OTSLTXDIR)/otslogo.pdf
ln
-s
$(
OTSLTXDIR
)
/otslogo.pdf
# Use the OTSLTX Makefile to turn .ltx into .pdf files
%.pdf
:
%.ltx
$(
MAKE
)
-f
${
OTSLTXDIR
}
/Makefile
$@
clean
:
rm
-f
otsreport.cls ots.sty otslogo.pdf
@
# Delete PDFs that we do not care enough about to check into the repo
@$(
foreach x,
${
TARGETS
}
, git status
-s
${
x
}
|
grep
-q
"M
${
x
}
"
||
rm
-f
${
x
};)
$(
MAKE
)
-f
${
OTSLTXDIR
}
/Makefile clean
@
# Remove otsltx submodule
git submodule deinit
-f
otsltx
rm
-rf
.git/modules/otsltx
git
rm
-f
otsltx
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment