Skip to content
Browse files

Makefile: Added a sed script to convert line endings to DOS style. Th…

…is has been tested with sed 3.02 from UnxUtils in Windows and sed 4.2.1 in Linux.
  • Loading branch information...
1 parent 686c2f8 commit 72cec65a11b0f4b162381368ef549a5a984255f2 @DavidEGrayson DavidEGrayson committed Apr 14, 2011
Showing with 4 additions and 1 deletion.
  1. +3 −1 Makefile
  2. +1 −0 libraries/dos_newlines.sed
View
4 Makefile
@@ -19,6 +19,7 @@ CP := cp# copies files
CAT := cat# outputs files
ECHO := echo# outputs some text to the standard output
GREP := grep# outputs lines from a file that match a given pattern
+SED := sed# edits files
WIXELCMD := wixelcmd# loads programs on the Wixel (command-line utility)
WIXELCONFIG := wixelconfig # Wixel Configuration Utility (GUI)
@@ -176,7 +177,8 @@ endif
$(V)$(GREP) param $(<:%.hex=%.cdb) >> $@.tmp || echo "(This app has no params.)"
$(V)$(ECHO) ====== hex>> $@.tmp
$(V)$(PACKIHX) $< >> $@.tmp
- $(V)mv -f $@.tmp $@
+ $(V)$(SED) -f libraries/dos_newlines.sed $@.tmp > $@
+ $(V)$(RM) $@.tmp
# Include all the dependency files generated during compilation so that Make
# knows which .rel files to recompile when a .h file changes.
View
1 libraries/dos_newlines.sed
@@ -0,0 +1 @@
+s/ *$/ /g

0 comments on commit 72cec65

Please sign in to comment.
Something went wrong with that request. Please try again.