From 26495a510a2533619ce68d6e3b48026c5b76d1d1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 7 Sep 2016 22:23:43 +0100 Subject: Add clean and realclean targets to each module's mini Makefile. Remove unnecessary extra printing while configuring modules. --- infrastructure/makebuildenv.pl.in | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'infrastructure/makebuildenv.pl.in') diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in index 60c6d854..e4f3b0f3 100755 --- a/infrastructure/makebuildenv.pl.in +++ b/infrastructure/makebuildenv.pl.in @@ -473,6 +473,7 @@ my %module_resources_win32; my @debug_build_targets; my @release_build_targets; my @all_clean_targets; +my @all_realclean_targets; my %mod_type_name; my %mod_end_targets; my %library_targets; @@ -521,8 +522,6 @@ for my $mod (@implicit_deps, @modules) my $end_target_file = $mod_end_targets{$mod}; my $target_is_library = $library_targets{$mod}; - print $mod,": $type\n"; - # add additional files for tests if($type eq 'test') { @@ -703,6 +702,14 @@ ${makefile_ifdef_prefix}endif .PHONY: default default: \$(MAKE) -C ../.. \$(TARGET) + +.PHONY: clean +clean: + \$(MAKE) -C ../.. clean_${type}_${name} + +.PHONY: realclean +realclean: + \$(MAKE) -C ../.. realclean_${type}_${name} __E close MINI_MODULE_MAKEFILE; @@ -920,8 +927,13 @@ __E clean_${type}_${name}: rm -rf \$(DEBUG_OUTBASE)/$mod/* rm -rf \$(RELEASE_OUTBASE)/$mod/* + +realclean_${type}_${name}: clean_${type}_${name} + rm -f $mod/t $mod/t-gdb $mod/Makefile + find $mod -name 'autogen_*' -type f -exec rm -f {} \\; __E push @all_clean_targets, "clean_${type}_${name}"; + push @all_realclean_targets, "realclean_${type}_${name}"; my $includes = ""; @@ -1295,8 +1307,7 @@ install: clean: @all_clean_targets cd docs; \$(MAKE) clean -realclean: clean - find . -name 'autogen_*' -type f -exec rm -f {} \\; +realclean: clean @all_realclean_targets find release debug -type f -exec rm -f {} \\; # and finally a target for rebuilding the build system: -- cgit v1.2.3