dtfile: still working on cpp issues, a better solution is needed
authorJon Trulson <jon@radscan.com>
Thu, 31 Oct 2019 00:59:25 +0000 (18:59 -0600)
committerJon Trulson <jon@radscan.com>
Thu, 31 Oct 2019 00:59:25 +0000 (18:59 -0600)
I think it's time to try tradcpp.

cde/programs/dtfile/Makefile.am

index bfbec41fbd5c8f92240bb1b38c45f461519719ee..c956232dc3375220d8f7697c56537ad4539f1b43 100644 (file)
@@ -43,10 +43,16 @@ dtfile_SOURCES = ChangeDir.c     ChangeDirP.c    Command.c       Common.c \
                 Prefs.c         PrefsP.c        SharedMsgs.c    SharedProcs.c \
                 ToolTalk.c      Trash.c         Utils.c         fsDialog.c
 
+# Mind the quoting here...
+LOCAL_CPP_DEFINES = -DSHAPE -D_ILS_MACROS -DSUN_PERF \
+               -DCDE_INSTALLATION_TOP="${prefix}" \
+               -DCDE_CONFIGURATION_TOP="$(CDE_CONFIGURATION_TOP)" \
+               -DKORNSHELL="$(KSH)"
+
 dtfile.config: dtfile.config.cpp
-       $(RM) dtfile.config
-       $(CPP) -P -DXCOMM=# $(AM_CPPFLAGS) dtfile.config.cpp -o dtfile.config
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $< > $@
 
 dtfile_error: dtfile_error.cpp
-       $(RM) dtfile_error
-       $(CPP) -P -DXCOMM=# $(AM_CPPFLAGS) dtfile_error.cpp -o dtfile_error
+       $(RM) $@
+       $(GENCPP) -P -DXCOMM=# $(LOCAL_CPP_DEFINES) $<  > $@