[libpeas/msvc: 2/10] peas-demo: Split out source listings



commit e194330d596b2f0744dc9478ae9a75dadd91020a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Oct 15 14:54:11 2018 +0800

    peas-demo: Split out source listings
    
    Make the source listings of the peas-demo program, as well as the
    helloworld and secondtime demos, into separate Makefile snippets of
    their own.  This allows the source listings to be shared between the
    autotools and NMake Makefiles.

 peas-demo/Makefile.am                                 | 7 +++----
 peas-demo/peas-demo-srcs.mak                          | 4 ++++
 peas-demo/plugins/helloworld/Makefile.am              | 8 +++-----
 peas-demo/plugins/helloworld/demo-helloworld-srcs.mak | 5 +++++
 peas-demo/plugins/secondtime/Makefile.am              | 6 +++---
 peas-demo/plugins/secondtime/demo-secondtime-srcs.mak | 3 +++
 6 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/peas-demo/Makefile.am b/peas-demo/Makefile.am
index 324ef15..d5e4ba4 100644
--- a/peas-demo/Makefile.am
+++ b/peas-demo/Makefile.am
@@ -10,10 +10,9 @@ AM_CPPFLAGS = \
        $(WARN_CFLAGS)          \
        $(DISABLE_DEPRECATED)
 
-peas_demo_SOURCES = \
-       peas-demo-window.c              \
-       peas-demo-window.h              \
-       peas-demo.c
+include peas-demo-srcs.mak
+
+peas_demo_SOURCES = $(PEAS_DEMO_SOURCES)
 
 peas_demo_LDADD = \
        ../libpeas/libpeas-1.0.la               \
diff --git a/peas-demo/peas-demo-srcs.mak b/peas-demo/peas-demo-srcs.mak
new file mode 100644
index 0000000..6075219
--- /dev/null
+++ b/peas-demo/peas-demo-srcs.mak
@@ -0,0 +1,4 @@
+PEAS_DEMO_SOURCES =    \
+       peas-demo-window.c              \
+       peas-demo-window.h              \
+       peas-demo.c
diff --git a/peas-demo/plugins/helloworld/Makefile.am b/peas-demo/plugins/helloworld/Makefile.am
index 5b6e46d..762b6dc 100644
--- a/peas-demo/plugins/helloworld/Makefile.am
+++ b/peas-demo/plugins/helloworld/Makefile.am
@@ -7,11 +7,9 @@ AM_CPPFLAGS = \
 
 plugin_LTLIBRARIES = libhelloworld.la
 
-libhelloworld_la_SOURCES = \
-       peasdemo-hello-world-plugin.h           \
-       peasdemo-hello-world-plugin.c           \
-       peasdemo-hello-world-configurable.h     \
-       peasdemo-hello-world-configurable.c
+include demo-helloworld-srcs.mak
+
+libhelloworld_la_SOURCES = $(DEMO_HELLOWORLD_SOURCES)
 
 libhelloworld_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
 libhelloworld_la_LIBADD  = \
diff --git a/peas-demo/plugins/helloworld/demo-helloworld-srcs.mak 
b/peas-demo/plugins/helloworld/demo-helloworld-srcs.mak
new file mode 100644
index 0000000..27f69f2
--- /dev/null
+++ b/peas-demo/plugins/helloworld/demo-helloworld-srcs.mak
@@ -0,0 +1,5 @@
+DEMO_HELLOWORLD_SOURCES =      \
+       peasdemo-hello-world-plugin.h           \
+       peasdemo-hello-world-plugin.c           \
+       peasdemo-hello-world-configurable.h     \
+       peasdemo-hello-world-configurable.c
diff --git a/peas-demo/plugins/secondtime/Makefile.am b/peas-demo/plugins/secondtime/Makefile.am
index 75e9059..b3bed05 100644
--- a/peas-demo/plugins/secondtime/Makefile.am
+++ b/peas-demo/plugins/secondtime/Makefile.am
@@ -7,9 +7,9 @@ AM_CPPFLAGS = \
 
 plugin_LTLIBRARIES = libsecondtime.la
 
-libsecondtime_la_SOURCES = \
-       second-time.h           \
-       second-time.c
+include demo-secondtime-srcs.mak
+
+libsecondtime_la_SOURCES = $(DEMO_SECONDTIME_SOURCES)
 
 libsecondtime_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
 libsecondtime_la_LIBADD  = \
diff --git a/peas-demo/plugins/secondtime/demo-secondtime-srcs.mak 
b/peas-demo/plugins/secondtime/demo-secondtime-srcs.mak
new file mode 100644
index 0000000..e3afeaf
--- /dev/null
+++ b/peas-demo/plugins/secondtime/demo-secondtime-srcs.mak
@@ -0,0 +1,3 @@
+DEMO_SECONDTIME_SOURCES =      \
+       second-time.h           \
+       second-time.c


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