diff options
author | Max Kellermann <max@duempel.org> | 2008-09-25 20:00:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-25 20:00:03 +0200 |
commit | cee4c0450e477e6b683fb3db883227c2a7fa423f (patch) | |
tree | 6d38e37ce065a8db8e7444fae5ab317cf97108f7 /src | |
parent | f87fea3cd0792de52c0620c329b67db096a7a687 (diff) | |
download | mpd-cee4c0450e477e6b683fb3db883227c2a7fa423f.tar.gz mpd-cee4c0450e477e6b683fb3db883227c2a7fa423f.tar.xz mpd-cee4c0450e477e6b683fb3db883227c2a7fa423f.zip |
screen: don't compile disabled sources
Instead of evaluating macros from config.h in the disabled source,
don't start the compiler on it at all.
Diffstat (limited to '')
-rw-r--r-- | src/Makefile.am | 21 | ||||
-rw-r--r-- | src/screen.c | 2 | ||||
-rw-r--r-- | src/screen_artist.c | 5 | ||||
-rw-r--r-- | src/screen_keydef.c | 5 | ||||
-rw-r--r-- | src/screen_lyrics.c | 4 | ||||
-rw-r--r-- | src/screen_search.c | 5 |
6 files changed, 18 insertions, 24 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 9a2d5c022..f91c2cff5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -58,20 +58,31 @@ ncmpc_SOURCES = \ screen_play.c\ screen_browser.c\ screen_file.c\ - screen_artist.c\ - screen_search.c\ screen_help.c\ - screen_lyrics.c\ - screen_keydef.c\ list_window.c\ colors.c\ support.c\ wreadln.c\ strfsong.c\ utils.c\ - lyrics.c \ str_pool.c +if ENABLE_ARTIST_SCREEN +ncmpc_SOURCES += screen_artist.c +endif + +if ENABLE_SEARCH_SCREEN +ncmpc_SOURCES += screen_search.c +endif + +if ENABLE_KEYDEF_SCREEN +ncmpc_SOURCES += screen_keydef.c +endif + +if ENABLE_LYRICS_SCREEN +ncmpc_SOURCES += screen_lyrics.c lyrics.c +endif + ncmpc_SOURCES+=${ncmpc_headers} diff --git a/src/screen.c b/src/screen.c index e391a9d62..71631db6e 100644 --- a/src/screen.c +++ b/src/screen.c @@ -61,7 +61,9 @@ extern const struct screen_functions screen_search; #ifdef ENABLE_KEYDEF_SCREEN extern const struct screen_functions screen_keydef; #endif +#ifdef ENABLE_LYRICS_SCREEN extern const struct screen_functions screen_lyrics; +#endif typedef struct screen_functions * (*screen_get_mode_functions_fn_t) (void); diff --git a/src/screen_artist.c b/src/screen_artist.c index be7049b4d..23a56d5b4 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -16,9 +16,6 @@ * */ -#include "config.h" - -#ifndef DISABLE_ARTIST_SCREEN #include "ncmpc.h" #include "options.h" #include "support.h" @@ -486,5 +483,3 @@ const struct screen_functions screen_artist = { .cmd = artist_cmd, .get_title = get_title, }; - -#endif /* ENABLE_ARTIST_SCREEN */ diff --git a/src/screen_keydef.c b/src/screen_keydef.c index ad5471476..a37d27d2a 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -16,9 +16,6 @@ * */ -#include "config.h" - -#ifndef DISABLE_KEYDEF_SCREEN #include "ncmpc.h" #include "mpdclient.h" #include "options.h" @@ -375,5 +372,3 @@ const struct screen_functions screen_keydef = { .cmd = keydef_cmd, .get_title = keydef_title, }; - -#endif diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index d83bf5b36..3c0393488 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -17,8 +17,6 @@ * */ -#include "config.h" -#ifndef DISABLE_LYRICS_SCREEN #include <sys/stat.h> #include "ncmpc.h" #include "options.h" @@ -336,5 +334,3 @@ const struct screen_functions screen_lyrics = { .cmd = lyrics_cmd, .get_title = lyrics_title, }; - -#endif /* ENABLE_LYRICS_SCREEN */ diff --git a/src/screen_search.c b/src/screen_search.c index 5135b6cf0..245eb5243 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -16,9 +16,6 @@ * */ -#include "config.h" - -#ifndef DISABLE_SEARCH_SCREEN #include "ncmpc.h" #include "options.h" #include "support.h" @@ -525,5 +522,3 @@ const struct screen_functions screen_search = { .cmd = search_cmd, .get_title = get_title, }; - -#endif /* ENABLE_SEARCH_SCREEN */ |