Collect the names of generated files and clean them away at target clean:
authorRichard Levitte <levitte@openssl.org>
Sat, 12 Mar 2016 11:42:49 +0000 (12:42 +0100)
committerRichard Levitte <levitte@openssl.org>
Sat, 12 Mar 2016 23:03:48 +0000 (00:03 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/unix-Makefile.tmpl

index 522d80f0d0ba13e3221bd05c2189fa82e775bed3..e9288dc3de2441b4e128a90d1265bb2c76cf4587 100644 (file)
@@ -84,6 +84,7 @@ DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
                   grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
                   keys %{$unified_info{sources}}); -}
 {- output_on() if $disabled{makedepend}; "" -}
+GENERATED={- join(" ", map { (my $x = $_) =~ s|\.S$|\.s|; $x } keys %{$unified_info{generate}}) -}
 
 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
 MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
@@ -242,13 +243,14 @@ install: install_sw install_ssldirs install_docs
 uninstall: uninstall_docs uninstall_sw
 
 clean: libclean
-       rm -f $(PROGRAMS) $(TESTPROGS)
-       rm -f `find $(BLDDIR) -name '*{- $depext -}'`
-       rm -f `find $(BLDDIR) -name '*{- $objext -}'`
-       rm -f $(BLDDIR)/core
-       rm -f $(BLDDIR)/tags $(BLDDIR)/TAGS
-       rm -f $(BLDDIR)/openssl.pc $(BLDDIR)/libcrypto.pc $(BLDDIR)/libssl.pc
-       -rm -f `find $(BLDDIR) -type l`
+       rm -f $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS)
+       rm -f $(GENERATED)
+       -rm -f `find . -name '*{- $depext -}'`
+       -rm -f `find . -name '*{- $objext -}'`
+       rm -f core
+       rm -f tags TAGS
+       rm -f openssl.pc libcrypto.pc libssl.pc
+       -rm -f `find . -type l`
        rm -f $(TARFILE)
 
 # This exists solely for those who still type 'make depend'