X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.in;h=30a5c015a6f982dd5703aa51498aa89eda347b4e;hp=3f4e1651a5ffdd147d1f55d5665f4b0b35ef2a22;hb=869f0e06ec4e15abc9230c1b2d7615da5250802e;hpb=1059e01cf4b984c1eea27f94291382e8977f1b51 diff --git a/Makefile.in b/Makefile.in index 3f4e1651..30a5c015 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,11 +11,14 @@ install_sh := @install_sh@ cmdline_dir := @cmdline_dir@ executables := @executables@ +GENGETOPT := @gengetopt@ +HELP2MAN := @help2man@ + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) cc_version := $(shell $(CC) --version | head -n 1) -codename := nested assignment +codename := mutual diversity GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h) @@ -42,6 +45,8 @@ ifeq ($(uname_s),Linux) LDFLAGS += -Wl,--gc-sections CPPFLAGS += -Wstrict-prototypes CPPFLAGS += -Wshadow + # causes warnings on *BSD for the feature test macros + CPPFLAGS += -Wunused-macros endif CPPFLAGS += -Os CPPFLAGS += -Wuninitialized @@ -53,7 +58,6 @@ CPPFLAGS += -DCODENAME='"$(codename)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -Werror-implicit-function-declaration CPPFLAGS += -Wmissing-noreturn -CPPFLAGS += -Wunused-macros CPPFLAGS += -Wbad-function-cast CPPFLAGS += -fno-strict-aliasing CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F) @@ -63,7 +67,6 @@ CPPFLAGS += -I$(cmdline_dir) CPPFLAGS += @osl_cppflags@ man_pages := $(patsubst %, man/man1/%.1, @executables@) -man_pages_in := $(patsubst %, web/%.man.in.html, @executables@) ggo_dir := ggo object_dir := objects @@ -107,6 +110,15 @@ tarball: $(tarball) -include $(ggo_dir)/makefile +# When in doubt, use brute force (Ken Thompson) +TOUPPER = \ +$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,\ +$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,\ +$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,\ +$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,\ +$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\ +$(subst z,Z,$1)))))))))))))))))))))))))) + %_command_list.c: %.cmd @[ -z "$(Q)" ] || echo 'GEN $@' $(Q) ./command_util.sh c < $< >$@ @@ -116,22 +128,24 @@ tarball: $(tarball) %_command_list.man: %.cmd @[ -z "$(Q)" ] || echo 'GEN $@' $(Q) ./command_util.sh man < $< > $@ +%_completion.h: %.cmd + @[ -z "$(Q)" ] || echo 'GEN $@' + $(Q) ./command_util.sh compl $(strip $(call TOUPPER,$(*F)))_COMPLETERS \ + $(strip $(call TOUPPER,$(*F)))_COMMANDS < $< > $@ -server_command_lists_ch = server_command_list.c afs_command_list.c \ - server_command_list.h afs_command_list.h server_command_lists_man = server_command_list.man afs_command_list.man man/man1/para_server.1: para_server $(server_command_lists_man) | $(man_dir) - @[ -z "$(Q)" ] || echo 'HELP2MAN $<' + @[ -z "$(Q)" ] || echo 'MAN $<' $(Q) opts="-h --detailed-help -N `for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \ - help2man $$opts ./para_server > $@ + $(HELP2MAN) $$opts ./para_server > $@ man/man1/para_audiod.1: para_audiod audiod_command_list.man | $(man_dir) - @[ -z "$(Q)" ] || echo 'HELP2MAN $<' - $(Q) help2man -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ + @[ -z "$(Q)" ] || echo 'MAN $<' + $(Q) $(HELP2MAN) -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ man/man1/%.1: % | $(man_dir) - @[ -z "$(Q)" ] || echo 'HELP2MAN $<' - $(Q) help2man -h --detailed-help -N ./$< > $@ + @[ -z "$(Q)" ] || echo 'MAN $<' + $(Q) $(HELP2MAN) -h --detailed-help -N ./$< > $@ man/html/%.html: man/man1/%.1 @[ -z "$(Q)" ] || echo 'MAN2HTML $<' @@ -191,6 +205,10 @@ $(object_dir)/aac_afh.o: aac_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< +$(object_dir)/mp3_afh.o: mp3_afh.c | $(object_dir) + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @id3tag_cppflags@ $< + $(object_dir)/gui%.o: gui%.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @curses_cppflags@ $< @@ -252,7 +270,7 @@ para_gui: $(gui_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lcurses -para_audiod: audiod_command_list.c audiod_command_list.h $(audiod_objs) +para_audiod: $(audiod_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(LDFLAGS) -o $@ $(audiod_objs) @audiod_ldflags@ @@ -264,7 +282,7 @@ para_fade: $(fade_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(LDFLAGS) -o $@ $(fade_objs) @fade_ldflags@ -para_server: $(server_command_lists_ch) $(server_objs) +para_server: $(server_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(LDFLAGS) -o $@ $(server_objs) @server_ldflags@ @@ -283,8 +301,7 @@ clean: clean2: clean @[ -z "$(Q)" ] || echo 'CLEAN2' $(Q) rm -rf man $(object_dir) $(cmdline_dir) - $(Q) rm -f *_command_list.* $(ggo_generated) - + $(Q) rm -f *_command_list.* *_completion.h $(ggo_generated) distclean: clean2 test-clean @[ -z "$(Q)" ] || echo 'DISTCLEAN' $(Q) rm -f Makefile autoscan.log config.status config.log