Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
5c5cd4b8
Commit
5c5cd4b8
authored
Nov 03, 2010
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: add "scores" target.
parent
e0faeb52
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
Makefile
Makefile
+19
-3
Makefile-ccan
Makefile-ccan
+8
-2
Makefile-web
Makefile-web
+0
-1
No files found.
Makefile
View file @
5c5cd4b8
...
...
@@ -14,9 +14,13 @@
# dependencies you don't have.
EXCLUDE
=
wwviaudio ogg_to_pcm
# Anything with an _info file is a module.
ALL
=
$(
filter-out
$(EXCLUDE)
,
$(
patsubst
ccan/%/_info, %,
$(
wildcard
ccan/
*
/_info
)))
ALL_DEPENDS
=
$(
patsubst
%, ccan/%/.depends,
$(ALL)
)
# Where make scores puts the results
SCOREDIR
=
scores/
$(
shell
whoami
)
/
$(
shell
uname
-s
)
-
$(
shell
uname
-m
)
-
$(CC)
ALL
=
$(
filter-out
$(EXCLUDE)
,
$(REALLY_ALL)
)
ALL_DEPENDS
=
$(
patsubst
%, ccan/%/.depends,
$(REALLY_ALL)
)
# Not all modules have tests.
ALL_TESTS
=
$(
patsubst
ccan/%/test/, %,
$(
foreach
dir
,
$(ALL)
,
$(
wildcard
ccan/
$(dir)
/test/
)))
...
...
@@ -70,6 +74,18 @@ check: $(ALL_TESTS:%=summary-check-%)
distclean
:
clean
rm
-f
$(ALL_DEPENDS)
scores
:
$(SCOREDIR)/SUMMARY
$(SCOREDIR)/SUMMARY
:
$(patsubst ccan/%/_info
,
$(SCOREDIR)/score-%
,
$(wildcard ccan/*/_info))
git describe
--always
>
$@
uname
-a
>>
$@
$(CC)
-v
>>
$@
cat
$^
|
grep
'Total score:'
>>
$@
$(SCOREDIR)/score-%
:
ccan/%/_info tools/ccanlint/ccanlint $(OBJFILES)
mkdir
-p
$(SCOREDIR)
tools/ccanlint/ccanlint
-v
-s
-d
ccan/
$*
>
$@
||
true
$(ALL_DEPENDS)
:
%/.depends: %/_info tools/ccan_depends
tools/ccan_depends
$*
>
$@
||
(
rm
-f
$@
;
exit
1
)
...
...
Makefile-ccan
View file @
5c5cd4b8
...
...
@@ -13,8 +13,14 @@ default: libccan.a
DEPGEN=-MD
-include ccan/*/*.d
# Every directory with .c files is included.
DIRS=$(filter-out $(foreach d,$(EXCLUDE),ccan/$d), $(patsubst %/, %, $(sort $(dir $(wildcard ccan/*/*.c)))))
# Anything with an _info file is a module.
REALLY_ALL=$(patsubst ccan/%/_info, %, $(wildcard ccan/*/_info))
# Exclude any modules we can't build.
ALL=$(filter-out $(EXCLUDE), $(REALLY_ALL))
# Anything with C files needs building; dir leaves / on, sort uniquifies
DIRS=$(patsubst %/, %, $(sort $(foreach m, $(ALL), $(dir $(wildcard ccan/$m/*.c)))))
# Generate everyone's separate Makefiles.
-include $(foreach dir, $(DIRS), $(dir)-Makefile)
...
...
Makefile-web
View file @
5c5cd4b8
...
...
@@ -2,7 +2,6 @@
WEBDIR=/home/rusty/www/html/ccan
# Ignore EXCLUDE when making webpages.
REALLY_ALL=$(patsubst ccan/%/_info, %, $(wildcard ccan/*/_info))
ALL_PAGES=$(patsubst %, $(WEBDIR)/info/%.html, $(REALLY_ALL))
DIRECT_TARBALLS=$(patsubst %, $(WEBDIR)/tarballs/%.tar.bz2, $(REALLY_ALL))
DEPEND_TARBALLS=$(patsubst %, $(WEBDIR)/tarballs/with-deps/%.tar.bz2, $(REALLY_ALL))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment