From: simonmar Date: Tue, 20 Jun 2000 11:20:50 +0000 (+0000) Subject: [project @ 2000-06-20 11:20:50 by simonmar] X-Git-Tag: Approximately_9120_patches~4168 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=236c8996424c9acd711f39b8c806cb77276275c2;p=ghc-hetmet.git [project @ 2000-06-20 11:20:50 by simonmar] mkdependHS doesn't understand the -o option anymore; instead it grokss ghc's -osuf option. We never really used this, and it behaves strangely when mixed with -s, but at least now it doesn't conflict with GHC's -opt options. --- diff --git a/ghc/utils/mkdependHS/mkdependHS.prl b/ghc/utils/mkdependHS/mkdependHS.prl index 91a7714..c665c94 100644 --- a/ghc/utils/mkdependHS/mkdependHS.prl +++ b/ghc/utils/mkdependHS/mkdependHS.prl @@ -27,6 +27,7 @@ Options recognised wherever they occur (mkdependHS or GHC): -package This program uses this GHC system library; take appropriate action (e.g., recognise when they are "import"ing a module from that library). + -osuf Use as the "object file" suffix ( default: o) mkdependHS-specific options (not between --'s): @@ -36,7 +37,6 @@ mkdependHS-specific options (not between --'s): -f blah Use "blah" as the makefile, rather than "makefile" or "Makefile". -cpp Wash the input files through cpp(1). - -o Use as the "object file" suffix ( default: o) -s Make extra dependencies for files with suffix ; thus, "-o hc -s _a" will make dependencies both for .hc files and for .a_hc @@ -240,6 +240,13 @@ sub mangle_command_line_args { push(@Syslibs, 'concurrent'); } elsif (/^-#include(.*)/) { &grab_arg_arg(*Args,'-#include',$1); + } elsif ( /^-osuf(.*)/ ) { + local($suff) = &grab_arg_arg(*Args,'-osuf',$1); + # Weed out existing entry .. there must be a better way of doing this + # with arrays (non-assoc) ! -- sof + @Obj_suffix = grep(!/$suff/,@Obj_suffix); + push(@Obj_suffix, $suff); + } elsif ($Dashdashes_seen != 1) { # not between -- ... -- if ( /^-v$/ ) { $Verbose++; @@ -247,15 +254,8 @@ sub mangle_command_line_args { $Warnings = 0; } elsif ( /^-f(.*)/ && !$ProcessingOptions ) { $Makefile = &grab_arg_arg(*Args,'-f',$1); - } elsif ( /^-o(.*)/ ) { - local($suff) = &grab_arg_arg(*Args,'-o',$1); - # Weed out existing entry .. there must be a better way of doing this - # with arrays (non-assoc) ! -- sof - @Obj_suffix = grep(!/$suff/,@Obj_suffix); - push(@Obj_suffix, $suff); # # --exclude-module=mod => it's stable, trust me! - } elsif ( /^-(x|-exclude-module=)(.*)/ ) { local($thing) = &grab_arg_arg(*Args,$1,$2); $IgnoreMe{$thing} = 'Y'; diff --git a/mk/target.mk b/mk/target.mk index 2158db3..0f98fe0 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -181,7 +181,7 @@ ifneq "$(MKDEPENDC_SRCS)" "" $(MKDEPENDC) -f .depend $(MKDEPENDC_OPTS) $(foreach way,$(WAYS),-s $(way)) -- $(CC_OPTS) -- $(MKDEPENDC_SRCS) endif ifneq "$(MKDEPENDHS_SRCS)" "" - $(MKDEPENDHS) -M -optdep-f -optdep.depend $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-optdep-o -optdep$(obj)) $(MKDEPENDHS_OPTS) $(HC_OPTS) $(MKDEPENDHS_SRCS) + $(MKDEPENDHS) -M -optdep-f -optdep.depend $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(MKDEPENDHS_OPTS) $(HC_OPTS) $(MKDEPENDHS_SRCS) endif