Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Template Coq-Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Max Ole Elliger
Template Coq-Project
Commits
745c2edd
Commit
745c2edd
authored
1 year ago
by
Max Ole Elliger
Browse files
Options
Downloads
Patches
Plain Diff
new Makefile structure to use to generated Makefile for more jobs
parent
d113f960
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
More use of generated makefile
Pipeline
#121582
failed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-1
1 addition, 1 deletion
.gitignore
Makefile
+7
-54
7 additions, 54 deletions
Makefile
with
8 additions
and
55 deletions
.gitignore
+
1
−
1
View file @
745c2edd
...
...
@@ -13,5 +13,5 @@ Makefile.coq
Makefile.coq.conf
.Makefile.coq.d
.coq-html.mk
public
/*
html
/*
_CoqProject
This diff is collapsed.
Click to expand it.
Makefile
+
7
−
54
View file @
745c2edd
...
...
@@ -2,33 +2,28 @@
#TODO Change the following lines for configuration.
PROJNAME
=
CoMoProj
HTMLDIR
=
public/
COMPONENTS
:=
src:SRC
COQDOC_FLAGS
=
--utf8
all
:
coq html
_CoqProject
all
:
coq html
coq
:
Makefile.coq
$(
MAKE
)
-f
Makefile.coq all
Makefile.coq
:
_CoqProject Makefile
html
:
Makefile.coq
$(
MAKE
)
-f
Makefile.coq html
Makefile.coq
:
_CoqProject
coq_makefile
-f
$<
-o
$@
GENERATED_HTML
=
.coq-html.mk
clean
:
Makefile.coq $(SRC)
clean
:
Makefile.coq
$(
MAKE
)
-f
$<
cleanall
rm
-f
Makefile.coq
rm
-f
Makefile.coq.conf
rm
-f
.Makefile.coq.d
rm
-f
_CoqProject
clean_html
:
clean $(HTMLDIR)
rm
-f
$(
GENERATED_HTML
)
rm
-f
-r
$(
HTMLDIR
)
clean_all
:
clean clean_html
define
GENCoqPr
BEGIN { RS="[[
:
space:]]"; FS=":" }
\
{
\
...
...
@@ -46,46 +41,4 @@ endef
_CoqProject
:
Makefile
echo
$(
COMPONENTS
)
|
awk
'
$(
GENCoqPr
)
'
>
$@
$(HTMLDIR)
:
mkdir
-p
$(
HTMLDIR
)
html
:
$(HTMLDIR)/toc.html
define
GENIndex
BEGIN
{
\
print
"<html><body><h1>Table of Contents for $(PROJNAME)</h1>"
;
\
}\
{\
printf(
"<h2><a href=\"%s.html\">%s</a></h2>\n"
,
$$1,
$$1);\
}
endef
$(HTMLDIR)/toc.html
:
$(HTMLDIR)
find
$(
HTMLDIR
)
-name
'*.html'
-print0
| xargs
-0
basename
-a
-s
.html |
grep
-Fxv
'toc'
|
sort
|
awk
'
$(
GENIndex
)
'
>
$@
define
GENMakefile
BEGIN { RS="[[
:
space:]]"; FS=":" }
\
{
\
dirname = $$1;
\
libname = $$2;
\
find = "find " dirname " -name '*.v' -maxdepth 1";
\
while ((find | getline line) > 0) {
\
match(line
,
/
\/
([^
\/
]+).v/
,
part);
\
html = HTMLDIR libname "." part[1] ".html";
\
print html ": " line " " HTMLDIR;
\
print "
\t
coqdoc -o $$@ $$< --lib-name $(PROJNAME) $(COQDOC_FLAGS)";
\
htmls = htmls " " html;
\
}
\
close(find);
\
}
\
END {
\
print "html:" htmls;
\
print HTMLDIR "/toc.html: " htmls;
\
}
endef
$(GENERATED_HTML)
:
Makefile $(HTMLDIR)
echo
$(
COMPONENTS
)
|
awk
-v
HTMLDIR
=
"
$(
HTMLDIR
)
"
'
$(
GENMakefile
)
'
>
$@
-include
$(GENERATED_HTML)
.PHONY
:
all html coq clean clean_html clean_all
.PHONY
:
all coq html clean
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