Author: vedge
Date: 2008-10-26 02:11:17 -0300 (Sun, 26 Oct 2008)
New Revision: 758

Added:
   trunk/cleanfiles.pl
Modified:
   trunk/Makefile
   trunk/build.proj.mk
   trunk/mkconcurrent.pl
   trunk/mkify.pl
Log:
clean up generated files properly post "make proj"


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile      2008-10-25 12:20:12 UTC (rev 757)
+++ trunk/Makefile      2008-10-26 05:11:17 UTC (rev 758)
@@ -10,7 +10,7 @@
        mkify \
        h2mandoc
 
-SHARE= hstrip.pl mkdep mkconcurrent.pl manlinks.pl cmpfiles.pl \
+SHARE= hstrip.pl mkdep mkconcurrent.pl manlinks.pl cmpfiles.pl cleanfiles.pl \
        gen-includes.pl gen-declspecs.pl get-version.pl get-release.pl \
        ml.xsl \
        build.common.mk build.dep.mk build.lib.mk build.man.mk \

Modified: trunk/build.proj.mk
===================================================================
--- trunk/build.proj.mk 2008-10-25 12:20:12 UTC (rev 757)
+++ trunk/build.proj.mk 2008-10-26 05:11:17 UTC (rev 758)
@@ -107,6 +107,9 @@
                        exit 1; \
                fi; \
                perl ${TOP}/mk/cmpfiles.pl added > .projfiles.out; \
+               echo "* Begin generated files:"; \
+               cat .projfiles.out; \
+               echo "* End generated files"; \
                cp -f .projfiles.out ${PROJFILELIST}; \
                rm .cmpfiles.out; \
                if [ "${PROJFILESEXTRA}" != "" ]; then \
@@ -128,6 +131,7 @@
                        env PKG_OS=$$_tgtos PKG_ARCH=$$_tgtarch \
                            PKG_IDE=$$_tgtproj ${MAKE} ${PROJPOSTPKG}; \
                fi; \
+               cat .projfiles.out | perl ${TOP}/mk/cleanfiles.pl; \
                rm -fR config .projfiles.out ${PROJFILELIST}; \
            done; \
        fi

Added: trunk/cleanfiles.pl
===================================================================
--- trunk/cleanfiles.pl                         (rev 0)
+++ trunk/cleanfiles.pl 2008-10-26 05:11:17 UTC (rev 758)
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+#
+# Public domain
+#
+# Remove files specified on input.
+#
+
+foreach my $file (<STDIN>) {
+       chop($file);
+       unlink($file) || print STDERR "Removing $file: $!\n";
+}

Modified: trunk/mkconcurrent.pl
===================================================================
--- trunk/mkconcurrent.pl       2008-10-25 12:20:12 UTC (rev 757)
+++ trunk/mkconcurrent.pl       2008-10-26 05:11:17 UTC (rev 758)
@@ -44,6 +44,8 @@
        '^ltmain\.sh$',
        '^manlinks\.pl$',
        '^hstrip\.pl$',
+       '^cmpfiles\.pl$',
+       '^cleanfiles\.pl$',
        '^gen-includes\.pl$',
        '^gen-declspecs\.pl$',
 );

Modified: trunk/mkify.pl
===================================================================
--- trunk/mkify.pl      2008-10-25 12:20:12 UTC (rev 757)
+++ trunk/mkify.pl      2008-10-26 05:11:17 UTC (rev 758)
@@ -29,6 +29,7 @@
        mkconcurrent.pl
        manlinks.pl
        cmpfiles.pl
+       cleanfiles.pl
        gen-declspecs.pl
        gen-includes.pl);
                  

_______________________________________________
BSDBuild-Commits mailing list
[email protected]
http://mail231.csoft.net/mailman/listinfo/bsdbuild-commits

Reply via email to