summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2016-09-07 22:23:43 +0100
committerChris Wilson <chris+github@qwirx.com>2016-09-09 20:54:18 +0100
commit26495a510a2533619ce68d6e3b48026c5b76d1d1 (patch)
treebc2bd4c1fdb3518f36f063a2750e05123d7debc4 /infrastructure
parent98a6ad72ee819774a398440055abd87bc44e9ba0 (diff)
Add clean and realclean targets to each module's mini Makefile.
Remove unnecessary extra printing while configuring modules.
Diffstat (limited to 'infrastructure')
-rwxr-xr-xinfrastructure/makebuildenv.pl.in19
1 files changed, 15 insertions, 4 deletions
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: