Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polytechnique
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
Container Registry
Model registry
Operate
Environments
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
typographix
polytechnique
Commits
4c12662c
Commit
4c12662c
authored
8 years ago
by
Clément DURAND
Browse files
Options
Downloads
Patches
Plain Diff
completed makefile
parent
2d3966a2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+34
-0
34 additions, 0 deletions
Makefile
makefile_unix.sh
+0
-46
0 additions, 46 deletions
makefile_unix.sh
source/Makefile
+37
-5
37 additions, 5 deletions
source/Makefile
with
71 additions
and
51 deletions
Makefile
0 → 100644
+
34
−
0
View file @
4c12662c
.PHONY
:
all %.all install %.install clean %.clean cleandist %.cleandist release
SUBMAKE
:=
make
-s
-C
SUBMAKABLE
:=
$(
shell find
-mindepth
2
-name
'[Mm]akefile'
|
sed
's%^./%%;s%/[^/]*%%'
)
define
submake
@tput
setaf
3
@echo
make[$1]
$2
@tput
sgr0
@$3
$(SUBMAKE)
$1
$2
endef
all
:
$(patsubst %
,
%.all
,
$(SUBMAKABLE))
%.all
:
$(
call submake,
$*
,,
)
install
:
$(patsubst %
,
%.install
,
$(SUBMAKABLE))
%.install
:
$(
call submake,
$*
,install,sudo
)
clean
:
$(patsubst %
,
%.clean
,
$(SUBMAKABLE))
%.clean
:
$(
call submake,
$*
,clean,
)
cleandist
:
$(patsubst %
,
%.cleandist
,
$(SUBMAKABLE))
%.cleandist
:
$(
call submake,
$*
,cleandist,
)
release
:
$(
call submake,.,,
)
$(
call submake,.,clean,
)
This diff is collapsed.
Click to expand it.
makefile_unix.sh
deleted
100644 → 0
+
0
−
46
View file @
2d3966a2
#! /bin/bash
if
[
"
$(
whoami
)
"
!=
"root"
]
;
then
echo
"Vous devez posséder les droits administrateurs pour installer ce package."
echo
"Veuillez utiliser la commande « sudo sh unix_installer.sh »."
exit
1
fi
cd source
pdflatex polytechnique.dtx
>>
/dev/null
makeindex
-q
-s
gind.ist
-o
polytechnique.ind polytechnique.idx
>>
/dev/null
pdflatex polytechnique.dtx
>>
/dev/null
rm
*
.aux
*
.glo
*
.idx
*
.ilg
*
.ind
*
.log
*
.toc
*
.out
>>
/dev/null
chemindist
=
$(
kpsewhich
-var-value
TEXMFMAIN
)
chemintex
=
${
chemindist
}
/tex/latex/polytechnique
cheminsource
=
${
chemindist
}
/source/latex/polytechnique
cheminsourceresources
=
${
chemindist
}
/source/latex/polytechnique
chemindoc
=
${
chemindist
}
/doc/latex/polytechnique
mkdir
${
chemintex
}
mkdir
${
cheminsource
}
mkdir
${
cheminsourceresources
}
mkdir
${
chemindoc
}
cp
polytechnique.dtx
${
cheminsource
}
cp
polytechnique.sty
${
chemintex
}
cp
polytechnique.pdf
${
chemindoc
}
cp
*
.eps
${
cheminsourceresources
}
cp
*
.eps
${
chemintex
}
cp
*
.pdf
${
cheminsourceresources
}
cp
*
.pdf
${
chemintex
}
echo
"************************************************"
echo
"* La base de donnees des packages est en train *"
echo
"* de se mettre à jour. Cela peut prendre un *"
echo
"* peu de temps. Merci de patienter. *"
echo
"************************************************"
texhash
>>
/dev/null
echo
"************************************************"
echo
"* Le package a ete installe ! La documentation *"
echo
"* se trouve a l'emplacement suivant : *"
echo
${
chemindoc
}
echo
"* Les fichiers sources et resources a *"
echo
"* l'endroit suivant : *"
echo
${
cheminsource
}
echo
"* Et le .sty a l'endroit suivant : *"
echo
${
chemintex
}
echo
"* Bonne utilisation ! *"
echo
"************************************************"
This diff is collapsed.
Click to expand it.
source/Makefile
+
37
−
5
View file @
4c12662c
.PHONY
:
package install clean cleandist
.PHONY
:
package install clean cleandist
V
:=
1
ifeq
("$V","1")
define
say
@tput
setaf
4
@echo
$1
@tput
sgr0
endef
else
define
say
endef
endif
define
installed
@tput
setaf
2
@tput
bold
@echo "SUCCESS
:
installed in '"$1"'."
endef
PDFLATEX
:=
pdflatex
-interaction
=
nonstopmode
PDFLATEX
:=
pdflatex
-interaction
=
nonstopmode
MAKEINDEX
:=
makeindex
-q
-s
gind.ist
-o
OUTPUT
:=>
/dev/null 2>&1
PKGDIR
:=
$(
shell kpsewhich
--show-path
=
ls-R |
tr
:
'\n'
|
grep
texmf |
grep local
|
head
-n1
)
PKGDIR
:=
$(
shell kpsewhich
--show-path
=
ls-R |
tr
:
'\n'
|
grep
texmf |
grep local
|
head
-n1
)
POLYPKGDIR
:=
$(
PKGDIR
)
/tex/latex/polytechnique
POLYPKGDIR
:=
$(
PKGDIR
)
/tex/latex/polytechnique
DTXFILES
:=
$(
shell find
-name
'*.dtx'
)
GENFILES
:=
$(
patsubst %.dtx,%.pdf,
$(
DTXFILES
))
$(
patsubst %.dtx,%.sty,
$(
DTXFILES
))
all
:
package
all
:
package
package
:
polytechnique.sty
package
:
polytechnique.sty
%.sty
:
%.dtx
%.sty
:
%.dtx
$(
PDFLATEX
)
$*
.dtx
$(
call say,creating package file
$@
)
@$(
PDFLATEX
)
$*
.dtx
$(
OUTPUT
)
@$(
MAKEINDEX
)
$*
.ind
$*
.idx
$(
OUTPUT
)
@$(
PDFLATEX
)
$*
.dtx
$(
OUTPUT
)
install
:
package clean
install
:
package clean
mkdir
-p
$(
POLYPKGDIR
)
$(
call say,creating destination
$(
POLYPKGDIR
))
cp
-r
.
$(
POLYPKGDIR
)
@
mkdir
-p
$(
POLYPKGDIR
)
$(
call say,copying files to
$(
POLYPKGDIR
))
@
cp
-r
.
$(
POLYPKGDIR
)
@
rm
-f
$(
POLYPKGDIR
)
/Makefile
$(
call installed,
$(
POLYPKGDIR
))
clean
:
clean
:
rm
-f
polytechnique.aux polytechnique.glo polytechnique.idx polytechnique.log polytechnique.out polytechnique.toc
$(
call say,cleaning files
)
@
rm
-f
polytechnique.aux polytechnique.glo polytechnique.idx polytechnique.log polytechnique.out polytechnique.toc polytechnique.ind polytechnique.ilg
cleandist
:
clean
cleandist
:
clean
rm
-f
polytechnique.pdf polytechnique.sty
$(
call say,removing doc and package files
)
@
rm
-f
$(
GENFILES
)
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