Skip to content

Commit

Permalink
Fix linux.mak's clean target to delete the generated doc directory
Browse files Browse the repository at this point in the history
Fix linux-2.mak:
  -- switch from using "VPATH .." to a narrower "vpath %.c ..; vpath %.d .."
  -- add -w to all .d compilations and -Wall to all .c compilations (except unittest.d -- compiler error causes an unavoidable warning)
  -- fix $(LIB) target to depend on ../linux.mak and ../linux-2.mak
  • Loading branch information
braddr committed Oct 16, 2007
1 parent d1111f5 commit f13c8ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions linux-2.mak
Expand Up @@ -12,14 +12,15 @@
# clean
# Delete all files created by build process

VPATH=..
vpath %.c ..
vpath %.d ..

LIB=libphobos2.a

DOC_OUTPUT_DIR=doc

CFLAGS=-m32
DFLAGS=-I..
CFLAGS=-m32 -Wall
DFLAGS=-I.. -w
ifneq (,$(findstring debug,$(MAKECMDGOALS)))
CFLAGS:=$(CFLAGS) -g
DFLAGS:=$(DFLAGS) -g
Expand Down Expand Up @@ -55,7 +56,7 @@ unittest : unittest.o $(LIB)
$(CC) -o $@ $^ -lpthread -lm -g

unittest.o : unittest.d
$(DMD) -c $(DFLAGS) $<
$(DMD) -c -I.. $<

INTERNAL_MODULES = aApply aApplyR aaA adi alloca arraycast arraycat cast cmath2 \
deh2 dmain2 invariant llmath memset obj object qsort switch trace
Expand Down Expand Up @@ -193,7 +194,7 @@ OBJS = crc32.o errno.o gcstats.o \
$(addprefix etc/c/,$(addsuffix .o,$(ETC_C_MODULES))) \
$(addprefix etc/c/zlib/,$(addsuffix .o,$(ZLIB_CMODULES)))

$(LIB) : $(OBJS) linux.mak
$(LIB) : $(OBJS) ../linux.mak ../linux-2.mak
rm -f $(LIB)
ar -r $@ $(OBJS)

Expand Down
1 change: 1 addition & 0 deletions linux.mak
Expand Up @@ -36,4 +36,5 @@ html :

clean :
$(RM) -r objdir*
$(RM) doc

0 comments on commit f13c8ed

Please sign in to comment.