source-tree.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. diff --git a/device/lib/Makefile.in b/device/lib/Makefile.in
  2. --- a/device/lib/Makefile.in
  3. +++ b/device/lib/Makefile.in
  4. @@ -649,19 +649,11 @@
  5. $(CP_U) -r $(MODELS) mcs51 ds390 ds400 z80 z180 ez80_z80 z80n r2k r2ka r3ka tlcs90 sm83 hc08 s08 stm8 pdk13 pdk14 pdk15 $(sdcc_libdir)/src
  6. for src in $(MODELS) ds390 ds400 z80 z180 ez80_z80 z80n r2k r2ka r3ka tlcs90 sm83 hc08 s08 mos6502 mos65c02 stm8 pdk13 pdk14 pdk15 pic14 pic16; do \
  7. - find $(sdcc_libdir)/src/$$src -depth \
  8. - \( -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lib' -o \
  9. - -name '*.lst' -o -name '*.asm' -o -name '.svn' -o -name 'autom4te.cache' -o \
  10. - -name 'build' -o -name 'bin' -o -name 'Makefile*' -o -name 'config*' -o \
  11. - -name 'depcomp' -o -name 'missing' -o -name 'install-sh' -o \
  12. - -name 'bootstrap.sh' \) \
  13. - -exec rm -rf {} + ; \
  14. + find $(sdcc_libdir)/src/$$src -type f -not -regex '.*\(/[A-Z]+\|\.\(c\|s\|S\|inc\)\)$$' -delete ; \
  15. + find $(sdcc_libdir)/src/$$src -type d -empty -delete ; \
  16. done
  17. - find $(sdcc_libdir)/src/mcs51 -depth \
  18. - \( -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lib' -o \
  19. - -name '*.lst' -o -name '.svn' -o -name 'build' -o -name 'bin' -o \
  20. - -name 'Makefile*' \) \
  21. - -exec rm -rf {} +
  22. + find $(sdcc_libdir)/src/mcs51 -type f -not -regex '.*\(/[A-Z]+\|\.\(c\|s\|S\|asm\|inc\)\)$$' -delete
  23. + find $(sdcc_libdir)/src/mcs51 -type d -empty -delete
  24. # Deleting all the installed files
  25. # --------------------------------
  26. diff --git a/device/non-free/lib/Makefile.in b/device/non-free/lib/Makefile.in
  27. --- a/device/non-free/lib/Makefile.in
  28. +++ b/device/non-free/lib/Makefile.in
  29. @@ -356,13 +356,8 @@
  30. $(CP_U) -r $(foreach p, $(ENABLED_PORTS), $(srcdir)/$(p)) $(sdcc_libdir)/src
  31. for src in $(ENABLED_PORTS); do \
  32. - find $(sdcc_libdir)/src/$$src -depth \
  33. - \( -name '*.rel' -o -name '*.dump*' -o -name '*.sym' -o -name '*.o' -o -name '*.lib' -o \
  34. - -name '*.lst' -o -name '*.asm' -o -name '.svn' -o -name 'autom4te.cache' -o \
  35. - -name 'build' -o -name 'bin' -o -name 'Makefile*' -o -name 'config*' -o \
  36. - -name 'depcomp' -o -name 'missing' -o -name 'install-sh' -o \
  37. - -name 'bootstrap.sh' \) \
  38. - -exec rm -rf {} + ; \
  39. + find $(sdcc_libdir)/src/$$src -type f -not -regex '.*\(/[A-Z]+\|\.\(c\|s\|S\|inc\)\)$$' -delete ; \
  40. + find $(sdcc_libdir)/src/$$src -type d -empty -delete ; \
  41. done
  42. endif