Skip to content

Commit

Permalink
build: Add 'clean' target to Makefile.win32 build system
Browse files Browse the repository at this point in the history
The Makefile.win32 in the subdirectories provide a working 'clean'
target (defined in Makefile.win32.common), the central Makefile.win32
'clean' target does not do anything.

Replace the noop 'clean' target with one that cleans all the subdirs.
  • Loading branch information
Andrea Canciani committed Feb 16, 2012
1 parent c60627e commit ed803a1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ EXTRA_DIST += \
README.win32 \
Makefile.win32 \
build/Makefile.win32.common \
build/Makefile.win32.inform \
build/Makefile.win32.features \
build/Makefile.win32.features-h \
$(NULL)
Expand Down
8 changes: 7 additions & 1 deletion Makefile.win32
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Edit build/Makefile.win32.common for customization

top_srcdir = .
include $(top_srcdir)/build/Makefile.win32.common
include $(top_srcdir)/build/Makefile.win32.inform

all: cairo

Expand All @@ -14,3 +14,9 @@ perf: inform

test: inform
@$(MAKE) -C test -f Makefile.win32 test

clean:
@$(MAKE) -C boilerplate -f Makefile.win32 clean
@$(MAKE) -C perf -f Makefile.win32 clean
@$(MAKE) -C src -f Makefile.win32 clean
@$(MAKE) -C test -f Makefile.win32 clean
15 changes: 1 addition & 14 deletions build/Makefile.win32.common
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ default: all
#
# Edit build/Makefile.win32.features to enable features to build
#
include $(top_srcdir)/build/Makefile.win32.inform
include $(top_srcdir)/build/Makefile.win32.features
include $(top_srcdir)/build/Makefile.win32.features-h

Expand Down Expand Up @@ -48,20 +49,6 @@ DEFAULT_ARFLAGS = -nologo
CAIRO_LDFLAGS = $(DEFAULT_LDFLAGS) $(LDFLAGS)
CAIRO_ARFLAGS = $(DEFAULT_ARFLAGS) $(LDFLAGS)

inform:
@echo
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
@echo "Invalid configuration "$(CFG)" specified."
@echo -n "You must specify a configuration when "
@echo "running make, e.g. make CFG=debug"
@echo
@echo -n "Possible choices for configuration are "
@echo "'release' and 'debug'"
@exit 1
endif
endif

# Some generic rules

$(CFG)/%.obj: %.c $(top_srcdir)/src/cairo-features.h
Expand Down
13 changes: 13 additions & 0 deletions build/Makefile.win32.inform
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
inform:
@echo
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
@echo "Invalid configuration "$(CFG)" specified."
@echo -n "You must specify a configuration when "
@echo "running make, e.g. make CFG=debug"
@echo
@echo -n "Possible choices for configuration are "
@echo "'release' and 'debug'"
@exit 1
endif
endif

0 comments on commit ed803a1

Please sign in to comment.