Skip to content

Commit

Permalink
makefile: split tools into 2 groups
Browse files Browse the repository at this point in the history
Signed-off-by: Jean Privat <[email protected]>
  • Loading branch information
privat committed Mar 3, 2018
1 parent 14e6b5b commit 0aabd05
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ all: tools man
@echo "To configure your shell environment, execute the following command:"
@echo " source misc/nit_env.sh install"

more:
cd src; make more

# Compile all programs in `contrib`, `examples` and `src`.
#
# Furthermore, build the toolchain’s `man` pages.
full: all
full: all more
for directory in $(extras); do \
(cd "$${directory}" && $(MAKE)) || exit 1; \
done
Expand Down
10 changes: 9 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@

NITCOPT=--semi-global
OLDNITCOPT=--semi-global
OBJS=nitc nitpick nit nitdoc nitls nitunit picnit nitpretty nitmetrics nitx nitlight nitserial nitrestful
OBJS=nitc nitpick nit nitls nitunit picnit nitx nitlight nitserial nitrestful
SRCS=$(patsubst %,%.nit,$(OBJS))
BINS=$(patsubst %,../bin/%,$(OBJS))
MOREOBJS=nitdoc nitweb nitcatalog nitmetrics nitpretty nitweb
MORESRCS=$(patsubst %,%.nit,$(MOREOBJS))
MOREBINS=$(patsubst %,../bin/%,$(MOREOBJS))
DEPS=$(wildcard *.nit */*.nit) parser/parser.nit

# Workaround: Cygwin requires peflags to bootstrap
peflags := ${shell which peflags 2>/dev/null}

all: ../bin/nitc

more: ../bin/nitdoc

pre-build:
./git-gen-version.sh

Expand All @@ -47,6 +52,9 @@ endif
test -d ../bin || mkdir ../bin
./nitc_0 ${NITCOPT} -v --dir ../bin $(SRCS)

../bin/nitdoc: ../bin/nitc $(DEPS)
../bin/nitc ${NITCOPT} -v --dir ../bin $(MORESRCS)

$(OBJS): nitc_0 $(DEPS)
./git-gen-version.sh
./nitc_0 ${NITCOPT} -v $@.nit
Expand Down

0 comments on commit 0aabd05

Please sign in to comment.