[PATCH 2/6] build: rename sed source files to .in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Prepare for autoconf-based substitution of macros in the file.
---
 Makefile                              | 14 +++++++-------
 ebtables-config => ebtables-config.in |  0
 ebtables-save => ebtables-save.in     |  0
 ebtables.8 => ebtables.8.in           |  0
 ebtables.sysv => ebtables.sysv.in     |  0
 5 files changed, 7 insertions(+), 7 deletions(-)
 rename ebtables-config => ebtables-config.in (100%)
 rename ebtables-save => ebtables-save.in (100%)
 rename ebtables.8 => ebtables.8.in (100%)
 rename ebtables.sysv => ebtables.sysv.in (100%)

diff --git a/Makefile b/Makefile
index 79ee167..d0a12d6 100644
--- a/Makefile
+++ b/Makefile
@@ -154,22 +154,22 @@ tmp1:=$(shell printf $(BINDIR) | sed 's/\//\\\//g')
 tmp2:=$(shell printf $(SYSCONFIGDIR) | sed 's/\//\\\//g')
 tmp3:=$(shell printf $(PIPE) | sed 's/\//\\\//g')
 .PHONY: scripts
-scripts: ebtables-save ebtables.sysv ebtables-config
-	cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
+scripts: ebtables-save.in ebtables.sysv.in ebtables-config.in
+	sed -e 's/__EXEC_PATH__/$(tmp1)/g' <ebtables-save.in >ebtables-save_
 	mkdir -p $(DESTDIR)$(BINDIR)
 	install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
-	cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
+	sed -e 's/__EXEC_PATH__/$(tmp1)/g' -e 's/__SYSCONFIG__/$(tmp2)/g' <ebtables.sysv.in >ebtables.sysv_
 	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
 	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
-	cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
+	sed -e 's/__SYSCONFIG__/$(tmp2)/g' <ebtables-config >ebtables-config_
 	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(SYSCONFIGDIR); fi
 	if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
 	rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
 
 tmp4:=$(shell printf $(LOCKFILE) | sed 's/\//\\\//g')
-$(MANDIR)/man8/ebtables.8: ebtables.8
+$(MANDIR)/man8/ebtables.8: ebtables.8.in
 	mkdir -p $(DESTDIR)$(@D)
-	sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8 > ebtables.8_
+	sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' <$< >ebtables.8_
 	install -m 0644 ebtables.8_ $(DESTDIR)$@
 	rm -f ebtables.8_
 
@@ -224,7 +224,7 @@ release:
 	touch include/*
 	touch include/linux/*
 	touch include/linux/netfilter_bridge/*
-	sed -i -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8
+	sed -i -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' <ebtables.8.in >ebtables.8
 	sed -i -e 's/$$(VERSION)/$(PROGVERSION_)/' -e 's/$$(RELEASE)/$(PROGRELEASE)/' ebtables.spec
 	cd ..;tar -c $(DIR) | gzip >$(DIR).tar.gz; cd -
 	rm -rf include/linux
diff --git a/ebtables-config b/ebtables-config.in
similarity index 100%
rename from ebtables-config
rename to ebtables-config.in
diff --git a/ebtables-save b/ebtables-save.in
similarity index 100%
rename from ebtables-save
rename to ebtables-save.in
diff --git a/ebtables.8 b/ebtables.8.in
similarity index 100%
rename from ebtables.8
rename to ebtables.8.in
diff --git a/ebtables.sysv b/ebtables.sysv.in
similarity index 100%
rename from ebtables.sysv
rename to ebtables.sysv.in
-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux