Skip to content

Commit

Permalink
The sloccount target belongs in top level.
Browse files Browse the repository at this point in the history
A few other tweaks to the Makefile -- in particular
the julia-{debug,release} targets are real files and
should be treated as such.

Also improved the way the sloccount gets files to
count: now it only gets files that are actually in
the git repository. With all the stuff in ext, we
were tallying in at a whopping $300+ million of
development time. Not quite realistic.
  • Loading branch information
StefanKarpinski committed Apr 24, 2011
1 parent 7378b2b commit a302c10
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
20 changes: 16 additions & 4 deletions Makefile
@@ -1,12 +1,13 @@
JULIAHOME = $(shell pwd)

include ./Make.inc

default: debug

julia-debug-build:
julia-debug: src/*
cd src && make debug

julia-release-build:
julia-release: src/*
cd src && make release

sys.ji: sysimg.j start_image.j src/boot.j src/dump.c *.j
Expand All @@ -20,14 +21,25 @@ PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+
pcre_h.j:
cpp -dM $(EXTROOT)/include/pcre.h | perl -nle '/^\s*#define\s+(PCRE\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "$$1 = $$2"' | sort > $@

debug release: %: julia-%-build pcre_h.j sys.ji custom.j
debug release: %: julia-% pcre_h.j sys.ji custom.j

test: debug
./julia tests.j

testall: test
./julia test_utf8.j

SLOCCOUNT = sloccount \
--addlang makefile \
--personcost 100000 \
--effort 3.6 1.2 \
--schedule 2.5 0.32

sloccount:
for x in $$(find -name '*.j'); do cp $$x $${x%.j}.hs; done
git ls-files | sed 's/\.j$$/.hs/' | xargs $(SLOCCOUNT) | sed 's/haskell/*julia*/g'
for x in $$(find -name '*.j'); do rm -f $${x%.j}.hs; done

clean:
$(MAKE) -C src clean
rm -f *.ji
Expand All @@ -37,4 +49,4 @@ clean:
cleanall: clean
$(MAKE) -C src cleanother

.PHONY: debug release test testall clean cleanall
.PHONY: debug release test testall sloccount clean cleanall
13 changes: 1 addition & 12 deletions src/Makefile
Expand Up @@ -86,17 +86,6 @@ julia-release-link:

debug release: %: ../julia-% julia-%-link

SLOCCOUNT = sloccount \
--addlang makefile \
--personcost 100000 \
--effort 3.6 1.2 \
--schedule 2.5 0.32

sloccount:
for x in *.j; do cp $$x $${x%.j}.hs; done
$(SLOCCOUNT) . | perl -ple 's/haskell/_julia_/g'
rm *.hs

clean:
rm -f *.o
rm -f *.do
Expand All @@ -114,4 +103,4 @@ cleanother:

cleanall: clean cleanother

.PHONY: debug release sloccount clean cleanall cleanother
.PHONY: debug release clean cleanall cleanother

0 comments on commit a302c10

Please sign in to comment.