more cleanup

Thank you for your time,
-Chase
From 9b5f92f93718daaf629b42d185ee4e84ad3e530b Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Sat, 1 Feb 2020 13:48:33 -0600
Subject: [PATCH] dtspcd: use sed instead of GENCPP

---
 cde/programs/dtspcd/Makefile.am   | 12 +++---
 cde/programs/dtspcd/dtspcdenv.src | 70 +++++++++++++++----------------
 2 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/cde/programs/dtspcd/Makefile.am b/cde/programs/dtspcd/Makefile.am
index d054eae9..e380daf2 100644
--- a/cde/programs/dtspcd/Makefile.am
+++ b/cde/programs/dtspcd/Makefile.am
@@ -2,7 +2,7 @@ MAITAINERCLEANFILES = Makefile.in
 
 bin_PROGRAMS = dtspcd
 
-dtspcd_CFLAGS = -DCDE_CONFIGURATION_TOP=\"${prefix}\" \
+dtspcd_CFLAGS = -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
 		-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
 		$(DT_INCDIR)
 
@@ -17,15 +17,15 @@ endif
 dtspcd_SOURCES = main.c spcd_event.c
 
 DEF_SYSTEM_PATH = "/bin:/usr/bin"
-LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP)	\
-	-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
-	-DDEF_SYSTEM_PATH=$(DEF_SYSTEM_PATH)
+
+do_subst = $(SED) -e 's+CDE_CONFIGURATION_TOP+$(CDE_CONFIGURATION_TOP)+g' \
+	          -e 's+DEF_SYSTEM_PATH+$(DEF_SYSTEM_PATH)+g'
 
 CPP_TARGETS = dtspcdenv
 BUILT_SOURCES = $(CPP_TARGETS)
 CLEANFILES = $(CPP_TARGETS)
 
 dtspcdenv: dtspcdenv.src
-	$(RM) $@
-	$(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
+	$(do_subst) $< > $@
+	chmod +x $@
 
diff --git a/cde/programs/dtspcd/dtspcdenv.src b/cde/programs/dtspcd/dtspcdenv.src
index b9f6e58c..86f490f1 100644
--- a/cde/programs/dtspcd/dtspcdenv.src
+++ b/cde/programs/dtspcd/dtspcdenv.src
@@ -1,39 +1,39 @@
-XCOMM $TOG: dtspcdenv.src /main/5 1999/02/26 11:30:21 mgreess $
-XCOMM #########################################################################
-XCOMM
-XCOMM dtspcdenv
-XCOMM
-XCOMM Common Desktop Environment
-XCOMM
-XCOMM Configuration file for the dtspcd
-XCOMM
-XCOMM (c) Copyright 1996 Digital Equipment Corporation.
-XCOMM (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
-XCOMM (c) Copyright 1993,1994,1996 International Business Machines Corp.
-XCOMM (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
-XCOMM (c) Copyright 1993,1994,1996 Novell, Inc. 
-XCOMM (c) Copyright 1996 FUJITSU LIMITED.
-XCOMM (c) Copyright 1996 Hitachi.
-XCOMM
-XCOMM     ************** DO NOT EDIT THIS FILE **************
-XCOMM
-XCOMM CDE_INSTALLATION_TOP/config/dtspcdenv is a factory-default file and will
-XCOMM be unconditionally overwritten upon subsequent installations.
-XCOMM Before making changes to the file, copy it to its configuration 
-XCOMM directory, CDE_CONFIGURATION_TOP/config/.
-XCOMM
-XCOMM ########################################################################
-XCOMM
-XCOMM Environment variables defined in this file will be propagated
-XCOMM to processes started by the CDE Subprocess Control daemon 'dtspcd'.  
-XCOMM
-XCOMM See the man page dtspcdenv(4M) for more information.
-XCOMM
-XCOMM ########################################################################
+# $TOG: dtspcdenv.src /main/5 1999/02/26 11:30:21 mgreess $
+# #########################################################################
+#
+# dtspcdenv
+#
+# Common Desktop Environment
+#
+# Configuration file for the dtspcd
+#
+# (c) Copyright 1996 Digital Equipment Corporation.
+# (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
+# (c) Copyright 1993,1994,1996 International Business Machines Corp.
+# (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
+# (c) Copyright 1993,1994,1996 Novell, Inc. 
+# (c) Copyright 1996 FUJITSU LIMITED.
+# (c) Copyright 1996 Hitachi.
+#
+#     ************** DO NOT EDIT THIS FILE **************
+#
+# CDE_INSTALLATION_TOP/config/dtspcdenv is a factory-default file and will
+# be unconditionally overwritten upon subsequent installations.
+# Before making changes to the file, copy it to its configuration 
+# directory, CDE_CONFIGURATION_TOP/config/.
+#
+# ########################################################################
+#
+# Environment variables defined in this file will be propagated
+# to processes started by the CDE Subprocess Control daemon 'dtspcd'.  
+#
+# See the man page dtspcdenv(4M) for more information.
+#
+# ########################################################################
 
 PATH=DEF_SYSTEM_PATH:$PATH
 
-XCOMM
-XCOMM SHELL is unset so its value in the user's password file
-XCOMM on the remote execution host will take precedence.
+#
+# SHELL is unset so its value in the user's password file
+# on the remote execution host will take precedence.
 unset SHELL
-- 
2.17.1

_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to