Sfoglia il codice sorgente

Move sed script out of Makefile

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42489 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 anni fa
parent
commit
1c4e04e937
2 ha cambiato i file con 8 aggiunte e 8 eliminazioni
  1. 1 8
      lib/python/ctypes/Makefile
  2. 7 0
      lib/python/ctypes/fix.sed

+ 1 - 8
lib/python/ctypes/Makefile

@@ -78,14 +78,7 @@ default:
 endif
 
 $(DSTDIR)/%.py: %.py | $(DSTDIR)
-	$(SED) \
-	-e '/^# End loader$$/a\
-	from ctypes_preamble import *\
-	from ctypes_preamble import _variadic_function\
-	from ctypes_loader import *' \
-	-e '/^# Begin preamble$$/,/^# End preamble$$/d' \
-	-e '/^# Begin loader$$/,/^# End loader$$/d' \
-	$< > $@
+	$(SED) -f fix.sed $< > $@
 
 $(DSTDIR)/ctypes_%.py: %.py | $(DSTDIR)
 	$(INSTALL_DATA) $< $@

+ 7 - 0
lib/python/ctypes/fix.sed

@@ -0,0 +1,7 @@
+#!/usr/bin/sed -f
+/^# End loader$/a\
+from ctypes_preamble import *\
+from ctypes_preamble import _variadic_function\
+from ctypes_loader import *
+/^# Begin preamble$/,/^# End preamble$/d
+/^# Begin loader$/,/^# End loader$/d